Mercurial > hg
diff mercurial/archival.py @ 36437:745b0df08514
py3: use bytes instead of str in isinstance
Internally we use bytes everywhere, and str on Python 3 is unicodes, so we need
to make sure we are doing the right check.
Differential Revision: https://phab.mercurial-scm.org/D2458
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 26 Feb 2018 17:27:08 +0530 |
parents | b72c6ff4e4c0 |
children | 588048a6a8d3 |
line wrap: on
line diff
--- a/mercurial/archival.py Mon Feb 26 18:00:29 2018 +0530 +++ b/mercurial/archival.py Mon Feb 26 17:27:08 2018 +0530 @@ -38,7 +38,7 @@ if prefix: prefix = util.normpath(prefix) else: - if not isinstance(dest, str): + if not isinstance(dest, bytes): raise ValueError('dest must be string if no prefix') prefix = os.path.basename(dest) lower = prefix.lower()