[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kupu-checkins
Subject:    [kupu-checkins] r39353 - kupu/trunk/kupu/plone
From:       hannosch () codespeak ! net
Date:       2007-02-24 10:42:11
Message-ID: 20070224104211.675E9101D9 () code0 ! codespeak ! net
[Download RAW message or body]

Author: hannosch
Date: Sat Feb 24 11:42:09 2007
New Revision: 39353

Modified:
   kupu/trunk/kupu/plone/util.py
Log:
Hack around problems in CMF 2.1's new skin path registry.


Modified: kupu/trunk/kupu/plone/util.py
==============================================================================
--- kupu/trunk/kupu/plone/util.py	(original)
+++ kupu/trunk/kupu/plone/util.py	Sat Feb 24 11:42:09 2007
@@ -15,7 +15,13 @@
     skinstool = getToolByName(self, 'portal_skins')
     if name not in skinstool.objectIds():
         kupu_plone_skin_dir = minimalpath(os.path.join(kupu_package_dir, relpath))
-        createDirectoryView(skinstool, kupu_plone_skin_dir, name)
+        # XXX Hack around problems in CMF 2.1
+        try:
+            createDirectoryView(skinstool, kupu_plone_skin_dir, name)
+        except ValueError:
+            kupu_plone_skin_dir = 'Products.kupu:/%s' % relpath
+            createDirectoryView(skinstool, kupu_plone_skin_dir, name)
+        
         print >>out, "The layer '%s' was added to the skins tool" % name
 
     if not add:

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic