Author: jmorliaguet
Date: Wed Dec  7 23:58:49 2005
New Revision: 1984

Modified:
   cpsskins/branches/jmo-perspectives/profiles/default/__init__.py
   cpsskins/branches/jmo-perspectives/setup/registration.py
Log:

- more generic registration (removed harcoded cpsskins.profiles)



Modified: cpsskins/branches/jmo-perspectives/profiles/default/__init__.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/profiles/default/__init__.py     
(original)
+++ cpsskins/branches/jmo-perspectives/profiles/default/__init__.py     Wed Dec 
 7 23:58:49 2005
@@ -19,4 +19,4 @@
 
 from cpsskins.setup.registration import register
 
-register('default', 'perspectives.xml')
+register('cpsskins.profiles.default', 'perspectives.xml')

Modified: cpsskins/branches/jmo-perspectives/setup/registration.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/setup/registration.py    (original)
+++ cpsskins/branches/jmo-perspectives/setup/registration.py    Wed Dec  7 
23:58:49 2005
@@ -28,12 +28,9 @@
 
 settings = []
 
-def base_path():
-    filename = sys.modules['cpsskins.profiles'].__file__
-    return os.path.dirname(filename)
-
 def register(profile, file):
-    settings.append(os.path.join(base_path(), profile, file))
+    base_path = os.path.dirname(sys.modules.get(profile).__file__)
+    settings.append(os.path.join(base_path, file))
 
 def loadSettings(event):
     for setting in settings:
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to