Mercurial > public > mercurial-scm > hg
comparison mercurial/templatefilters.py @ 8390:beae42f3d93b
drop unused imports
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Thu, 14 May 2009 15:35:46 +0200 |
parents | 4b798b100c32 |
children | 08c93b07f5ad |
comparison
equal
deleted
inserted
replaced
8389:4b798b100c32 | 8390:beae42f3d93b |
---|---|
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2, incorporated herein by reference. | 6 # GNU General Public License version 2, incorporated herein by reference. |
7 | 7 |
8 import cgi, re, os, time, urllib, textwrap | 8 import cgi, re, os, time, urllib, textwrap |
9 import util, templater, encoding | 9 import util, encoding |
10 | 10 |
11 def stringify(thing): | 11 def stringify(thing): |
12 '''turn nested template iterator into string.''' | 12 '''turn nested template iterator into string.''' |
13 if hasattr(thing, '__iter__') and not isinstance(thing, str): | 13 if hasattr(thing, '__iter__') and not isinstance(thing, str): |
14 return "".join([stringify(t) for t in thing if t is not None]) | 14 return "".join([stringify(t) for t in thing if t is not None]) |