Commit d7f7f484 authored by Rafael Monnerat's avatar Rafael Monnerat

Allow flexibility. Call before script before sense.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39076 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ff434999
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -65,6 +62,11 @@ It will start an instance upgrade if any of the following alarms:\n
"sense" a need of an upgrade. This alarm is likely to disappear soon as it\'s needed \n
due to lack of functionality (which is that alarms can not automatically "solve" themselves).\n
"""\n
# If before script is present call it.\n
before_script = getattr(context, \'ERP5Site_beforeSenseUpgrade\', None)\n
if before_script is not None:\n
before_script()\n
\n
context.ERP5Site_setupUpgraderSkinSelection()\n
\n
portal_alarms = context.getPortalObject().portal_alarms\n
......@@ -178,11 +180,13 @@ return\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>before_script</string>
<string>_getattr_</string>
<string>portal_alarms</string>
<string>activate</string>
<string>None</string>
<string>previous_tag</string>
<string>active_process</string>
<string>DateTime</string>
......@@ -190,7 +194,6 @@ return\n
<string>previous_method_id</string>
<string>_getiter_</string>
<string>alarm_id</string>
<string>getattr</string>
<string>upgrader_alarm</string>
<string>False</string>
</tuple>
......
......@@ -73,8 +73,6 @@ for pt in portal_type_list:\n
portal_type_document = getattr(context.portal_types, pt, None )\n
if portal_type_document is not None:\n
portal_type_document.updateRoleMapping()\n
else:\n
message_list.append("Unable to upgrade security on %s portal type because it is not present on portal." % pt)\n
\n
message_list.append(\n
"Update Local Roles for security groups for: \\n\\t%s" % \\\n
......
536
\ No newline at end of file
537
\ 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