Author: jmorliaguet
Date: Sun May 21 22:55:42 2006
New Revision: 3190

Modified:
   cpsskins/branches/paris-sprint-2006/setup/archives.py
   cpsskins/branches/paris-sprint-2006/setup/registration.py

Log:

- fixed directory paths. web images are now loaded from the filesystem



Modified: cpsskins/branches/paris-sprint-2006/setup/archives.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/archives.py       (original)
+++ cpsskins/branches/paris-sprint-2006/setup/archives.py       Sun May 21 
22:55:42 2006
@@ -17,6 +17,7 @@
 """
 __docformat__ = "reStructuredText"
 
+import os
 import time
 
 from StringIO import StringIO
@@ -72,14 +73,14 @@
     """
     implements(IArchive)
 
-    def __init__(self):
-        pass
+    def __init__(self, dir=u''):
+        self.dir = dir
 
     def __setitem__(self, k, v):
         raise IOError("File-system archives are read-only.")
 
     def __getitem__(self, k):
-        file = open(k)
+        file = open(os.path.join(self.dir, k))
         data = file.read()
         file.close()
         return data

Modified: cpsskins/branches/paris-sprint-2006/setup/registration.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/registration.py   (original)
+++ cpsskins/branches/paris-sprint-2006/setup/registration.py   Sun May 21 
22:55:42 2006
@@ -80,9 +80,9 @@
 def loadSettings():
     """Load all registered settings.
     """
-    archive = FileSystemArchive()
     for setting_file in settings_files:
         filepath = setting_file['filepath']
+        archive = FileSystemArchive(dir=os.path.dirname(filepath))
         importSettings(archive, context=None, filepath=filepath)
         setting_file['refresh_date'] = time.time()
         logger.debug("loaded settings from %s", filepath)
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to