py3: use bytes instead of str in isinstance
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 26 Feb 2018 17:27:08 +0530
changeset 36437 745b0df08514
parent 36436 4223bef1489c
child 36438 93228b2a1fc0
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
mercurial/archival.py
--- 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()