Mercurial > hg-stable
changeset 36074:788b2e8530ae
py3: use raw string for file open mode
Otherwise the module importer rewrites it to bytes on Python 3,
which angers Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2137
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 10:52:13 -0800 |
parents | 95791b275b73 |
children | 8de90e006c78 |
files | mercurial/archival.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/archival.py Sun Feb 11 10:49:00 2018 -0800 +++ b/mercurial/archival.py Sun Feb 11 10:52:13 2018 -0800 @@ -218,7 +218,7 @@ dest.tell() except (AttributeError, IOError): dest = tellable(dest) - self.z = zipfile.ZipFile(dest, 'w', + self.z = zipfile.ZipFile(dest, r'w', compress and zipfile.ZIP_DEFLATED or zipfile.ZIP_STORED)