Fix running Glances on non-Linux OSes

This commit is contained in:
Alessio Sergi 2014-04-23 20:04:15 +02:00
parent 6e7c3a275e
commit 210d1692fc

View File

@ -19,6 +19,7 @@
# Import system libs
import os
import sys
try:
from configparser import RawConfigParser
from configparser import NoOptionError
@ -29,7 +30,10 @@ except ImportError: # Python 2
# Import Glances lib
from glances.core.glances_globals import (
__appname__,
is_BSD,
is_Linux,
is_Mac,
is_Windows,
is_python3,
work_path
)
@ -65,7 +69,7 @@ class Config(object):
# print(_("DEBUG: Read configuration file %s") % path)
self.config_path = path
except UnicodeDecodeError as e:
print(_("Error decoding config file '%s': %s") % (path, e))
print(_("Error decoding config file '{0}': {1}").format(path, e))
sys.exit(1)
break