mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Open CSV files in binary mode on Python 2. Closes GH-1230.
This commit is contained in:
parent
2d1816e8f4
commit
52517c8ca6
@ -251,7 +251,8 @@ class ChannelUserDB(ChannelUserDictionary):
|
||||
log.debug('Exception: %s', utils.exnToString(e))
|
||||
|
||||
def flush(self):
|
||||
fd = utils.file.AtomicFile(self.filename, makeBackupIfSmaller=False)
|
||||
mode = 'wb' if utils.minisix.PY2 else 'w'
|
||||
fd = utils.file.AtomicFile(self.filename, mode, makeBackupIfSmaller=False)
|
||||
writer = csv.writer(fd)
|
||||
items = list(self.items())
|
||||
if not items:
|
||||
|
Loading…
Reference in New Issue
Block a user