configfile: Convert to Python3 string encoding

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-06-12 13:04:16 -04:00
parent b859c11378
commit 0da3d84a87
1 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ class PrinterConfig:
return self.printer
def _read_config_file(self, filename):
try:
f = open(filename, 'rb')
f = open(filename, 'r')
data = f.read()
f.close()
except:
@ -383,7 +383,7 @@ class PrinterConfig:
logging.info("SAVE_CONFIG to '%s' (backup in '%s')",
cfgname, backup_name)
try:
f = open(temp_name, 'wb')
f = open(temp_name, 'w')
f.write(data)
f.close()
os.rename(cfgname, backup_name)