Commit db99e5a0 authored by Nicolas Dumazet's avatar Nicolas Dumazet

use dict instead of set to avoid a NameError, thanks Jerome :)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33445 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 49c129ed
...@@ -82,12 +82,15 @@ for bt_id in bt_id_list:\n ...@@ -82,12 +82,15 @@ for bt_id in bt_id_list:\n
bt_object_dict[bt.getId()] = [bt.getTitle(), getModifiedObjectList(bt)]\n bt_object_dict[bt.getId()] = [bt.getTitle(), getModifiedObjectList(bt)]\n
\n \n
object_list = []\n object_list = []\n
no_backup_set = set([\'Action\', \'SiteProperty\', \'Module\', \'Document\', \n no_backup_list = [\'Action\', \'SiteProperty\', \'Module\', \'Document\', \n
\'PropertySheet\', \'Extension\', \'Test\', \'Product\', \n \'PropertySheet\', \'Extension\', \'Test\', \'Product\', \n
\'Role\', \'CatalogResultKey\', \'CatalogRelatedKey\', \n \'Role\', \'CatalogResultKey\', \'CatalogRelatedKey\', \n
\'CatalogResultTable\', \'MessageTranslation\', \'LocalRoles\', \n \'CatalogResultTable\', \'MessageTranslation\', \'LocalRoles\', \n
\'PortalTypeAllowedContentType\', \'PortalTypeHiddenContentType\', \n \'PortalTypeAllowedContentType\', \'PortalTypeHiddenContentType\', \n
\'PortalTypePropertySheet\', \'PortalTypeBaseCategory\'])\n \'PortalTypePropertySheet\', \'PortalTypeBaseCategory\']\n
no_backup_dict = {}\n
for i in no_backup_list:\n
no_backup_dict[i] = True\n
\n \n
install_title = Base_translateString(\'Install\')\n install_title = Base_translateString(\'Install\')\n
upgrade_title = Base_translateString(\'Upgrade\')\n upgrade_title = Base_translateString(\'Upgrade\')\n
...@@ -105,12 +108,12 @@ for bt in bt_id_list:\n ...@@ -105,12 +108,12 @@ for bt in bt_id_list:\n
line = newTempBase(context, \'tmp_install_%s\' % i)\n line = newTempBase(context, \'tmp_install_%s\' % i)\n
\n \n
if object_state == \'Modified\':\n if object_state == \'Modified\':\n
if object_class in no_backup_set:\n if object_class in no_backup_dict:\n
choice_item_list = [[upgrade_title, \'install\']]\n choice_item_list = [[upgrade_title, \'install\']]\n
else:\n else:\n
choice_item_list = [[backup_title, \'backup\']]\n choice_item_list = [[backup_title, \'backup\']]\n
elif object_state == \'Removed\':\n elif object_state == \'Removed\':\n
if object_class in no_backup_set:\n if object_class in no_backup_dict:\n
choice_item_list = [[remove_title, \'remove\']]\n choice_item_list = [[remove_title, \'remove\']]\n
else:\n else:\n
choice_item_list = [[save_and_remove_title, \'save_and_remove\']]\n choice_item_list = [[save_and_remove_title, \'save_and_remove\']]\n
...@@ -185,8 +188,10 @@ return object_list\n ...@@ -185,8 +188,10 @@ return object_list\n
<string>bt</string> <string>bt</string>
<string>_write_</string> <string>_write_</string>
<string>object_list</string> <string>object_list</string>
<string>set</string> <string>no_backup_list</string>
<string>no_backup_set</string> <string>no_backup_dict</string>
<string>i</string>
<string>True</string>
<string>install_title</string> <string>install_title</string>
<string>upgrade_title</string> <string>upgrade_title</string>
<string>backup_title</string> <string>backup_title</string>
...@@ -196,7 +201,6 @@ return object_list\n ...@@ -196,7 +201,6 @@ return object_list\n
<string>modified_object_list</string> <string>modified_object_list</string>
<string>keys</string> <string>keys</string>
<string>enumerate</string> <string>enumerate</string>
<string>i</string>
<string>object_id</string> <string>object_id</string>
<string>object_state</string> <string>object_state</string>
<string>object_class</string> <string>object_class</string>
......
1502 1503
\ 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