Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2019-10-23 22:44:45 +0200
committerArthur de Jong <arthur@arthurdejong.org>2019-10-23 22:44:45 +0200
commita3bf19246e589390b6793d3a5041c3a348078dd1 (patch)
treebabf2870b747681128b2adf3cd11d0ed5cf17a08
parentd47bf14edd393ba7a1cfda316b37ec783d46a468 (diff)
Read datafile by specifying encoding
This makes the script Python 3 only.
-rw-r--r--munin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/munin.py b/munin.py
index b39de83..a784228 100644
--- a/munin.py
+++ b/munin.py
@@ -59,7 +59,7 @@ def get_info():
"""Return a description of all the graphs."""
data = defaultdict(dict)
# parse the datafile and group by graph
- with open(os.path.join(MUNIN_DBDIR, 'datafile'), 'rt') as f:
+ with open(os.path.join(MUNIN_DBDIR, 'datafile'), 'rt', encoding='utf-8') as f:
for line in f:
if ':' in line:
source, line = line.split(':', 1)