Mercurial > hg
diff mercurial/templater.py @ 8015:b5db7dcc1497
templatefilters: strings are iterators, but shouldn't be joined anyway
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 06 Apr 2009 16:26:57 +0200 |
parents | aa983c3d94a9 |
children | 63c47e4ac617 |
line wrap: on
line diff
--- a/mercurial/templater.py Mon Apr 06 10:51:45 2009 +0200 +++ b/mercurial/templater.py Mon Apr 06 16:26:57 2009 +0200 @@ -209,6 +209,6 @@ def stringify(thing): '''turn nested template iterator into string.''' - if hasattr(thing, '__iter__'): + if hasattr(thing, '__iter__') and not isinstance(thing, str): return "".join([stringify(t) for t in thing if t is not None]) return str(thing)