Bug#298516: Acknowledgement (zope-cmfphotoalbum: Failure to install with CMF quick installer.)

2005-03-08 Thread Per Bojsen
The following patch fixed the problem for me (not tested with Plone,
though):

--- Install.py.orig 2005-01-30 07:11:10.0 -0500
+++ Install.py  2005-03-07 23:25:38.0 -0500
@@ -39,8 +39,14 @@
 else:
 out.write('Skipping %s skin\n' % skin)
 
-portal_prop=getToolByName(self, 'portal_properties')
-nav=portal_prop.navigation_properties
+try:
+portal_prop=getToolByName(self, 'portal_properties')
+nav=portal_prop.navigation_properties
+except AttributeError:
+out.write(Not running in a Plone site.  Ignoring Plone specific 
installation.\n);
+except:
+print Unexpected error:, sys.exc_info()[0]
+   raise
 
 #out.write('Added navigation properties.')

Per
 
-- 
Per Bojsen  [EMAIL PROTECTED]
7 Francis Road
Billerica, MA 01821-3618
USA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#298516: Acknowledgement (zope-cmfphotoalbum: Failure to install with CMF quick installer.)

2005-03-08 Thread Per Bojsen
Sorry, the patch just sent was the one for CMFPhoto, not
CMFPhotoAlbum.  Here is the correct patch for CMFPhotoAlbum:

--- Install.py.orig 2005-03-07 23:01:22.0 -0500
+++ Install.py  2005-03-07 23:21:56.0 -0500
@@ -40,11 +40,17 @@
 out.write('Skipping %s skin\n' % skin)
 
 portal_prop=getToolByName(self, 'portal_properties')
-nav=portal_prop.navigation_properties
+#nav=portal_prop.navigation_properties
 
-site_props = getToolByName(self, 'portal_properties').site_properties
-use_folder_tabs = site_props.getProperty('use_folder_tabs')
-site_props._updateProperty('use_folder_tabs', tuple(use_folder_tabs) + 
('Photo Album',))
+try:
+site_props = getToolByName(self, 'portal_properties').site_properties
+use_folder_tabs = site_props.getProperty('use_folder_tabs')
+site_props._updateProperty('use_folder_tabs', tuple(use_folder_tabs) + 
('Photo Album',))
+except AttributeError:
+out.write(Not running in a Plone site.  Ignoring Plone specific 
installation.\n);
+except:
+print Unexpected error:, sys.exc_info()[0]
+   raise
 
 #
nav.manage_addProperty('photoalbum.folder_edit_form.success','script:folder_edit','string');
 #
nav.manage_addProperty('photoalbum.folder_edit_form.failure','folder_edit_form','string');

Per

-- 
Per Bojsen  [EMAIL PROTECTED]
7 Francis Road
Billerica, MA 01821-3618
USA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]