Commit d30c9963 authored by Antoine Catton's avatar Antoine Catton

Simplification of algorithm of bang

parent 581b4703
......@@ -60,11 +60,8 @@ root_software_instance = root_hosting_subscription.HostingSubscription_requestRo
# Use iterative algorithm instead of recursive approach in order to avoid\n
# complexity as much as possible.\n
flat_tree = [root_software_instance]\n
while True:\n
try:\n
software_instance = flat_tree.pop(0)\n
except:\n
break\n
while flat_tree:\n
software_instance = flat_tree.pop(0)\n
flat_tree.extend(software_instance.getPredecessorValueList())\n
try:\n
software_instance.Item_getInstancePackingListLine(service_relative_url=portal.portal_preferences.getPreferredInstanceCleanupResource())\n
......
340
\ No newline at end of file
341
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment