##// END OF EJS Templates
archival: don't try and fsdecode non-{bytes,str} objects...
Augie Fackler -
r40283:844deb40 default
parent child Browse files
Show More
@@ -203,7 +203,9 b' class zipit(object):'
203 or compressed with deflate.'''
203 or compressed with deflate.'''
204
204
205 def __init__(self, dest, mtime, compress=True):
205 def __init__(self, dest, mtime, compress=True):
206 self.z = zipfile.ZipFile(pycompat.fsdecode(dest), r'w',
206 if isinstance(dest, bytes):
207 dest = pycompat.fsdecode(dest)
208 self.z = zipfile.ZipFile(dest, r'w',
207 compress and zipfile.ZIP_DEFLATED or
209 compress and zipfile.ZIP_DEFLATED or
208 zipfile.ZIP_STORED)
210 zipfile.ZIP_STORED)
209
211
General Comments 0
You need to be logged in to leave comments. Login now