config: Use pathlib.Path.open() instead of open().

This commit is contained in:
Emmanuel Gil Peyrot 2018-07-08 10:56:59 +02:00
parent b3a944c76b
commit cabc8fcd94

View file

@ -368,7 +368,7 @@ class Config(RawConfigParser):
"""
if file_ok(self.file_name):
try:
with open(self.file_name, 'r', encoding='utf-8') as df:
with self.file_name.open('r', encoding='utf-8') as df:
lines_before = [line.strip() for line in df]
except OSError:
log.error(