Fixes #40352 write() argument must be str, not bytes
This commit is contained in:
@@ -123,7 +123,7 @@ class SavingMixin(object):
|
||||
def _saver(self, text):
|
||||
if not self.filename:
|
||||
return
|
||||
with open(self.filename, 'w') as f:
|
||||
with open(self.filename, 'wb') as f:
|
||||
os.chmod(self.filename, 0o600)
|
||||
f.write(text.encode('UTF_8'))
|
||||
f.flush()
|
||||
|
||||
Reference in New Issue
Block a user