Support xml blocks w/ multiple parents

This commit is contained in:
Don Mitchell
2014-08-06 11:27:14 -04:00
parent e900a47b3f
commit 7a75b94ff7

View File

@@ -233,7 +233,12 @@ def import_from_xml(
"""
if subtree.has_children:
for child in subtree.get_children():
all_locs.remove(child.location)
try:
all_locs.remove(child.location)
except KeyError:
# ContentStoreTest.test_image_import has non-tree children
# so, make this more robust
pass
if verbose:
log.debug('importing module location {loc}'.format(loc=child.location))