mypy, read explicitly as binary
This commit is contained in:
parent
2a86d52c00
commit
b8152e2d23
@ -113,7 +113,7 @@ class UserInterface:
|
|||||||
as string.
|
as string.
|
||||||
'''
|
'''
|
||||||
if filename:
|
if filename:
|
||||||
with open(filename, 'w') as f:
|
with open(filename, 'wb') as f:
|
||||||
pickle.dump(self.relations, f)
|
pickle.dump(self.relations, f)
|
||||||
return None
|
return None
|
||||||
return base64.b64encode(pickle.dumps(self.relations)).decode()
|
return base64.b64encode(pickle.dumps(self.relations)).decode()
|
||||||
@ -130,7 +130,7 @@ class UserInterface:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
elif filename:
|
elif filename:
|
||||||
with open(filename) as f:
|
with open(filename, 'rb') as f:
|
||||||
self.relations = pickle.load(f)
|
self.relations = pickle.load(f)
|
||||||
|
|
||||||
def session_reset(self) -> None:
|
def session_reset(self) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user