##// END OF EJS Templates
py3: replace str with bytes in isinstance()...
Pulkit Goyal -
r32970:11c0bb4c default
parent child Browse files
Show More
@@ -477,7 +477,7 b' def clone(ui, peeropts, source, dest=Non'
477 remote's path/URL. Defaults to "identity."
477 remote's path/URL. Defaults to "identity."
478 """
478 """
479
479
480 if isinstance(source, str):
480 if isinstance(source, bytes):
481 origsource = ui.expandpath(source)
481 origsource = ui.expandpath(source)
482 source, branch = parseurl(origsource, branch)
482 source, branch = parseurl(origsource, branch)
483 srcpeer = peer(ui, peeropts, source)
483 srcpeer = peer(ui, peeropts, source)
@@ -126,7 +126,7 b' def _showlist(name, values, mapping, plu'
126 yield templ(noname, **mapping)
126 yield templ(noname, **mapping)
127 return
127 return
128 if name not in templ:
128 if name not in templ:
129 if isinstance(values[0], str):
129 if isinstance(values[0], bytes):
130 yield separator.join(values)
130 yield separator.join(values)
131 else:
131 else:
132 for v in values:
132 for v in values:
@@ -1101,7 +1101,7 b' stringify = templatefilters.stringify'
1101 def _flatten(thing):
1101 def _flatten(thing):
1102 '''yield a single stream from a possibly nested set of iterators'''
1102 '''yield a single stream from a possibly nested set of iterators'''
1103 thing = templatekw.unwraphybrid(thing)
1103 thing = templatekw.unwraphybrid(thing)
1104 if isinstance(thing, str):
1104 if isinstance(thing, bytes):
1105 yield thing
1105 yield thing
1106 elif thing is None:
1106 elif thing is None:
1107 pass
1107 pass
@@ -1110,7 +1110,7 b' def _flatten(thing):'
1110 else:
1110 else:
1111 for i in thing:
1111 for i in thing:
1112 i = templatekw.unwraphybrid(i)
1112 i = templatekw.unwraphybrid(i)
1113 if isinstance(i, str):
1113 if isinstance(i, bytes):
1114 yield i
1114 yield i
1115 elif i is None:
1115 elif i is None:
1116 pass
1116 pass
General Comments 0
You need to be logged in to leave comments. Login now