Mercurial > hg
changeset 3647:734e337cb816
further simplify stringify
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 15 Nov 2006 15:51:58 -0600 |
parents | 069f3acdad6c |
children | 2801a3efc7c3 |
files | mercurial/templater.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Wed Nov 15 15:51:58 2006 -0600 +++ b/mercurial/templater.py Wed Nov 15 15:51:58 2006 -0600 @@ -156,8 +156,7 @@ def stringify(thing): '''turn nested template iterator into string.''' if hasattr(thing, '__iter__'): - return "".join([stringify(t) for t in thing]) - if thing is None: return "" + return "".join([stringify(t) for t in thing if t is not None]) return str(thing) para_re = None