提交 729efdb2 编写于 作者: N Nicolas Hennion

Merge branch 'master' of github.com:nicolargo/glances

......@@ -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/
......
......@@ -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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册