From: Ɓukasz Rekucki Date: Tue, 8 Jun 2010 09:50:23 +0000 (+0200) Subject: Make deploy search in config dir first. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/08d8018f613bad8e07c510fdecc7392c798de8b8?ds=sidebyside;hp=28eed140e4dde5ae3ec206c47a6d5f30f0296607 Make deploy search in config dir first. --- 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