[Erp5-report] r19018 - /erp5/trunk/products/ERP5Form/ScribusUtils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 4 12:02:51 CET 2008
Author: fabien
Date: Mon Feb 4 12:02:50 2008
New Revision: 19018
URL: http://svn.erp5.org?rev=19018&view=rev
Log:
- add a condition for cases where form.group_list is empty (rename group only
if there is already at least one).
- correct a mistake : close() method was called on a string object instead of
the file.
Modified:
erp5/trunk/products/ERP5Form/ScribusUtils.py
Modified: erp5/trunk/products/ERP5Form/ScribusUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ScribusUtils.py?rev=19018&r1=19017&r2=19018&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ScribusUtils.py (original)
+++ erp5/trunk/products/ERP5Form/ScribusUtils.py Mon Feb 4 12:02:50 2008
@@ -217,11 +217,12 @@
# default_groups list completed, need to update the form_groups
# rename the first group because it can't be removed
- form.rename_group(form.group_list[0], default_groups[0])
+ if len(form.group_list):
+ form.rename_group(form.group_list[0], default_groups[0])
# add other groups
- if len(default_groups) > 1:
- for group in default_groups[1:]:
+ for group in default_groups:
+ if group not in form.group_list:
form.add_group(group)
form_view_id_object.rename_group('Default', default_groups[0])
@@ -693,7 +694,7 @@
# this line permit to delete tempory files (about 24 Mo for each file !)
# it's temporary because this function mus be rewrited or deleted
# (perhaps setBackgroundPictures could return attributes list)
- ScribusUtilsOriginaltempsPPMName.close()
+ ScribusUtilsOriginaltempsPPM.close()
pg_nbr = len(original_result[1].split('\n'))
real_size_x = {}
More information about the Erp5-report
mailing list