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 ...@@ -60,11 +60,8 @@ root_software_instance = root_hosting_subscription.HostingSubscription_requestRo
# Use iterative algorithm instead of recursive approach in order to avoid\n # Use iterative algorithm instead of recursive approach in order to avoid\n
# complexity as much as possible.\n # complexity as much as possible.\n
flat_tree = [root_software_instance]\n flat_tree = [root_software_instance]\n
while True:\n while flat_tree:\n
try:\n software_instance = flat_tree.pop(0)\n
software_instance = flat_tree.pop(0)\n
except:\n
break\n
flat_tree.extend(software_instance.getPredecessorValueList())\n flat_tree.extend(software_instance.getPredecessorValueList())\n
try:\n try:\n
software_instance.Item_getInstancePackingListLine(service_relative_url=portal.portal_preferences.getPreferredInstanceCleanupResource())\n software_instance.Item_getInstancePackingListLine(service_relative_url=portal.portal_preferences.getPreferredInstanceCleanupResource())\n
......
340 341
\ No newline at end of file \ 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