diff mercurial/templater.py @ 3654:734e337cb816

further simplify stringify
author Matt Mackall <mpm@selenic.com>
date Wed, 15 Nov 2006 15:51:58 -0600
parents b4ad640a3bcf
children abaee83ce0a6 0dd07dd63db3
line wrap: on
line diff
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -156,8 +156,7 @@ def age(date):
 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