Mercurial > traipse_dev
diff orpg/xmltramp.py @ 24:c88a794d9a22 traipse_dev
Too many deletes again. Tested on Linux.
author | sirebral |
---|---|
date | Sat, 25 Jul 2009 21:08:48 -0500 |
parents | 551cd440acce |
children |
line wrap: on
line diff
--- a/orpg/xmltramp.py Sat Jul 25 21:05:18 2009 -0500 +++ b/orpg/xmltramp.py Sat Jul 25 21:08:48 2009 -0500 @@ -64,7 +64,8 @@ out += '>' if recursive: content = 0 - for x in self._dir: if isinstance(x, Element): content = 1 + for x in self._dir: + if isinstance(x, Element): content = 1 pad = '\n' + ('\t' * recursive) for x in self._dir: if multiline and content: out += pad @@ -72,7 +73,8 @@ elif isinstance(x, Element): out += x.__repr__(recursive+1, multiline, inprefixes.copy()) else: raise TypeError, "I wasn't expecting "+`x`+"." if multiline and content: out += '\n' + ('\t' * (recursive-1)) - else: if self._dir: out += '...' + else: + if self._dir: out += '...' out += '</'+qname(self._name, inprefixes)+'>' return out