diff --git a/README.rst b/README.rst index 59e92bfa..ef0b7580 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ .. image:: https://travis-ci.org/nicolargo/glances.png?branch=master :target: https://travis-ci.org/nicolargo/glances .. image:: https://badge.fury.io/py/Glances.png - :target: http://badge.fury.io/py/Glances + :target: http://badge.fury.io/py/Glances .. image:: https://pypip.in/d/Glances/badge.png :target: https://crate.io/packages/Glances @@ -121,7 +121,7 @@ Thanks to Nicolas Bourges, Glances can be easily installed using a Windows insta Otherwise, you have to follow these steps: - Install Python for Windows: http://www.python.org/getit/ -- Install the psutil library: https://code.google.com/p/psutil/downloads/list +- Install the psutil library: https://pypi.python.org/pypi?:action=display&name=psutil#downloads - Install the colorconsole library: http://code.google.com/p/colorconsole/downloads/list - Download Glances from here: http://nicolargo.github.io/glances/ diff --git a/glances/glances.py b/glances/glances.py index e970f367..0232d017 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -387,7 +387,15 @@ class Config: """ for path in self.get_paths_list(): if os.path.isfile(path) and os.path.getsize(path) > 0: - self.parser.read(path) + try: + if sys.version_info >= (3, 2): + self.parser.read(path, encoding='utf-8') + else: + self.parser.read(path) + except UnicodeDecodeError as e: + print(_("Error decoding config file '%s': %s") % (path, e)) + sys.exit(1) + break def get_paths_list(self): diff --git a/requirements.txt b/requirements.txt index 27c1c789..acb5bdb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -psutil==1.1.0 +psutil==1.1.2