mercurial/templateutil.py
changeset 52644 e627cc25b6f3
parent 52643 5cc8deb96b48
equal deleted inserted replaced
52643:5cc8deb96b48 52644:e627cc25b6f3
   869             elif i is None:
   869             elif i is None:
   870                 pass
   870                 pass
   871             elif not hasattr(i, '__iter__'):
   871             elif not hasattr(i, '__iter__'):
   872                 yield pycompat.bytestr(i)
   872                 yield pycompat.bytestr(i)
   873             else:
   873             else:
   874                 for j in flatten(context, mapping, i):
   874                 yield from flatten(context, mapping, i)
   875                     yield j
       
   876 
   875 
   877 
   876 
   878 def stringify(context, mapping, thing):
   877 def stringify(context, mapping, thing):
   879     """Turn values into bytes by converting into text and concatenating them"""
   878     """Turn values into bytes by converting into text and concatenating them"""
   880     if isinstance(thing, bytes):
   879     if isinstance(thing, bytes):