--- a/mercurial/templater.py Thu Aug 18 17:25:10 2016 +0200
+++ b/mercurial/templater.py Thu Aug 18 15:55:07 2016 +0900
@@ -917,17 +917,19 @@
'''yield a single stream from a possibly nested set of iterators'''
if isinstance(thing, str):
yield thing
+ elif thing is None:
+ pass
elif not util.safehasattr(thing, '__iter__'):
- if thing is not None:
- yield str(thing)
+ yield str(thing)
else:
for i in thing:
if isinstance(i, str):
yield i
+ elif i is None:
+ pass
elif not util.safehasattr(i, '__iter__'):
- if i is not None:
- yield str(i)
- elif i is not None:
+ yield str(i)
+ else:
for j in _flatten(i):
yield j