Skip to content

Commit

Permalink
[#252] Removed unnecessary child.getparent() call
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed May 22, 2014
1 parent 99bea7f commit eac9e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions akvo/scripts/cordaid/cordaid_project_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def check_lang(element, lang):
# Remove element if xml:lang differs from activity language and there is another element
# that does match the xml:lang or does not have a xml:lang specified.
if check_lang(child1, lang) and not check_lang(child2, lang):
child2.getparent().remove(child2)
element.remove(child2)
elif not check_lang(child1, lang) and check_lang(child2, lang):
child1.getparent().remove(child1)
element.remove(child1)

return activity_element

Expand Down

0 comments on commit eac9e2b

Please sign in to comment.