diff options
| author | ianb <devnull@localhost> | 2005-07-21 21:15:32 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-07-21 21:15:32 +0000 |
| commit | d7e6f5ea7716050634663318e2be79f58fd5f150 (patch) | |
| tree | 1e48b23e71483b18c4bca7b7b4144b2444a7bf51 /paste | |
| parent | fb47091de1f40019ca52a211131871018506f188 (diff) | |
| download | paste-d7e6f5ea7716050634663318e2be79f58fd5f150.tar.gz | |
Go up to higher-level directories to find server.conf
Diffstat (limited to 'paste')
| -rw-r--r-- | paste/app_setup.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/paste/app_setup.py b/paste/app_setup.py index 21b1eee..cf85e8c 100644 --- a/paste/app_setup.py +++ b/paste/app_setup.py @@ -74,9 +74,14 @@ def find_template_option(args): return None, [] def find_template_config(args): - conf_fn = os.path.join(os.getcwd(), 'server.conf') - if not os.path.exists(conf_fn): - return None, None + base = os.getcwd() + while 1: + conf_fn = os.path.join(base, 'server.conf') + if os.path.exists(conf_fn): + break + base, last_base = os.path.dirname(base), base + if last_base == base: # Root dir + return None, None conf = pyconfig.Config(with_default=True) conf.load(conf_fn) return conf_fn, conf.get('app_template') |
