Make deploy search in config dir first.
authorŁukasz Rekucki <lrekucki@gmail.com>
Tue, 8 Jun 2010 09:50:23 +0000 (11:50 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Tue, 8 Jun 2010 09:50:23 +0000 (11:50 +0200)
deployment.py

index f19a25f..8f06d76 100644 (file)
@@ -74,9 +74,11 @@ class DeploySite(object):
         self.restart_app()
 
     def find_resource(self, path):
-        full_path = os.path.join(self.env['APP_DIR'], path)
-        if os.path.isfile(full_path):
-            return full_path
+        for dir in (self.env['CONFIG_DIR'], self.env['APP_DIR']):
+            full_path = os.path.join(dir, path)
+            if os.path.isfile(full_path):
+                return full_path
+
         raise ValueError("Resource '%s' not found" % path)
 
     @classmethod