From 08d8018f613bad8e07c510fdecc7392c798de8b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Tue, 8 Jun 2010 11:50:23 +0200 Subject: [PATCH] Make deploy search in config dir first. --- deployment.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deployment.py b/deployment.py index f19a25ff..8f06d764 100644 --- a/deployment.py +++ b/deployment.py @@ -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 -- 2.20.1