mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 20:21:35 +03:00
Correct an issue after commit eaa8e39771
concerning the QickLook display
This commit is contained in:
parent
eaa8e39771
commit
3992ff07ad
@ -28,6 +28,7 @@ __license__ = 'LGPL'
|
||||
import platform
|
||||
import signal
|
||||
import sys
|
||||
import locale
|
||||
|
||||
# Import psutil
|
||||
try:
|
||||
@ -41,6 +42,17 @@ except ImportError:
|
||||
from glances.core.glances_logging import logger
|
||||
from glances.core.glances_main import GlancesMain
|
||||
|
||||
# Setup translations
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
except locale.Error:
|
||||
# Issue #517
|
||||
# Setting LC_ALL to '' should not generate an error unless LC_ALL is not
|
||||
# defined in the user environment, which can be the case when used via SSH.
|
||||
# So simply skip this error, as python will use the C locale by default.
|
||||
logger.warning("No locale LC_ALL variable found. Use the default C locale.")
|
||||
pass
|
||||
|
||||
# Check Python version
|
||||
if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3):
|
||||
print('Glances requires at least Python 2.6 or 3.3 to run.')
|
||||
|
Loading…
Reference in New Issue
Block a user