changeset 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 4223bef1489c
children 93228b2a1fc0
files mercurial/archival.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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()