summaryrefslogtreecommitdiff
path: root/gpscap.py
diff options
context:
space:
mode:
Diffstat (limited to 'gpscap.py')
-rw-r--r--gpscap.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpscap.py b/gpscap.py
index 84e8e985..51f7c6d8 100644
--- a/gpscap.py
+++ b/gpscap.py
@@ -19,7 +19,10 @@ class GPSDictionary(configparser.RawConfigParser):
configparser.RawConfigParser.__init__(self)
if not files:
files = ["gpscap.ini", "/usr/share/gpsd/gpscap.ini"]
- self.read(files)
+ try:
+ self.read(files, encoding='utf-8')
+ except TypeError:
+ self.read(files) # For Python 2.6
# Resolve uses= members
while True:
keepgoing = False