Fix minor Python 3 renames and deprecations (#7)

This commit is contained in:
f4lco
2020-04-23 12:41:27 +02:00
parent 89d46ff9b3
commit 5960dd2ebd
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
import ConfigParser
import configparser
import io
import os
@@ -12,10 +12,10 @@ Canteen = namedtuple('Canteen',
def _get_config(filename):
config = ConfigParser.SafeConfigParser()
config = configparser.ConfigParser()
path = os.path.join(os.path.dirname(__file__), filename)
with io.open(path, encoding='utf-8') as config_file:
config.readfp(config_file)
config.read_file(config_file)
return config