Fixed line lengths in ElementBase to comply with PEP8.

This commit is contained in:
Lance Stout 2010-08-26 13:55:23 -04:00
parent d68bc2ba07
commit e16b37d2be

View file

@ -257,8 +257,8 @@ class ElementBase(object):
for stanza in self.iterables:
iterables.append(stanza.getStanzaValues())
iterables[-1].update({
'__childtag__': "{%s}%s" % (stanza.namespace, stanza.name)
})
'__childtag__': "{%s}%s" % (stanza.namespace,
stanza.name)})
values['substanzas'] = iterables
return values
@ -556,9 +556,10 @@ class ElementBase(object):
if parent is None:
parent = self.xml
for element in elements:
if element.tag == original_target or not element.getchildren():
# Only delete the originally requested elements, and any
# parent elements that have become empty.
if element.tag == original_target or \
not element.getchildren():
# Only delete the originally requested elements, and
# any parent elements that have become empty.
parent.remove(element)
if not all:
# If we don't want to delete elements up the tree, stop