diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2019-10-23 22:44:45 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2019-10-23 22:44:45 +0200 |
commit | a3bf19246e589390b6793d3a5041c3a348078dd1 (patch) | |
tree | babf2870b747681128b2adf3cd11d0ed5cf17a08 | |
parent | d47bf14edd393ba7a1cfda316b37ec783d46a468 (diff) |
Read datafile by specifying encoding
This makes the script Python 3 only.
-rw-r--r-- | munin.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |