# HG changeset patch # User Dirkjan Ochtman # Date 2009-04-06 14:26:57 # Node ID b5db7dcc14972cfb01897f703654225a0ab098f9 # Parent 6a77ba181bc6185ca8a588449e74b813ac466d7b templatefilters: strings are iterators, but shouldn't be joined anyway diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -209,6 +209,6 @@ def stylemap(style, paths=None): 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)