##// END OF EJS Templates
templater: explode if we try to emit a str...
Augie Fackler -
r34724:b13c9591 default
parent child Browse files
Show More
@@ -1240,6 +1240,11 b' def _flatten(thing):'
1240 thing = templatekw.unwraphybrid(thing)
1240 thing = templatekw.unwraphybrid(thing)
1241 if isinstance(thing, bytes):
1241 if isinstance(thing, bytes):
1242 yield thing
1242 yield thing
1243 elif isinstance(thing, str):
1244 # We can only hit this on Python 3, and it's here to guard
1245 # against infinite recursion.
1246 raise error.ProgrammingError('Mercurial IO including templates is done'
1247 ' with bytes, not strings')
1243 elif thing is None:
1248 elif thing is None:
1244 pass
1249 pass
1245 elif not util.safehasattr(thing, '__iter__'):
1250 elif not util.safehasattr(thing, '__iter__'):
General Comments 0
You need to be logged in to leave comments. Login now