diff options
author | ianb <ianb@localhost> | 2007-05-25 02:55:48 +0000 |
---|---|---|
committer | ianb <ianb@localhost> | 2007-05-25 02:55:48 +0000 |
commit | f4d7c110acb14226430a072a6455d498771a710d (patch) | |
tree | 48ff833c9be0cabbcd609b483ae42cf5c25c1d4a | |
parent | 6b3125beb512d1f38871027dc98957abb47f6e3a (diff) | |
download | pastedeploy-git-f4d7c110acb14226430a072a6455d498771a710d.tar.gz |
Fix appconfig and filter-with
-rw-r--r-- | docs/news.txt | 7 | ||||
-rw-r--r-- | paste/deploy/loadwsgi.py | 2 | ||||
-rw-r--r-- | tests/sample_configs/test_filter_with.ini | 1 | ||||
-rw-r--r-- | tests/test_config.py | 4 |
4 files changed, 13 insertions, 1 deletions
diff --git a/docs/news.txt b/docs/news.txt index 63c42c3..5448bf5 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -1,6 +1,13 @@ Paste Deployment News ===================== +svn trunk +--------- + +* Fix ``appconfig`` config loading when using a config file with + ``filter-with`` in it (previously you'd get TypeError: iteration + over non-sequence) + 1.3 --- diff --git a/paste/deploy/loadwsgi.py b/paste/deploy/loadwsgi.py index 9e1fd13..3bb820f 100644 --- a/paste/deploy/loadwsgi.py +++ b/paste/deploy/loadwsgi.py @@ -400,7 +400,7 @@ class ConfigLoader(_Loader): obj=None, object_type=FILTER_WITH, protocol=None, - global_conf=None, local_conf=None, + global_conf=global_conf, local_conf=local_conf, loader=self) filter_with_context.filter_context = self.filter_context( name=filter_with, global_conf=global_conf) diff --git a/tests/sample_configs/test_filter_with.ini b/tests/sample_configs/test_filter_with.ini index ec6592b..118804f 100644 --- a/tests/sample_configs/test_filter_with.ini +++ b/tests/sample_configs/test_filter_with.ini @@ -1,5 +1,6 @@ [app:main] use = egg:FakeApp#basic_app +example = test filter-with = filter1 [filter:filter1] diff --git a/tests/test_config.py b/tests/test_config.py index cf19cf5..6fffe82 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -94,6 +94,10 @@ def test_appconfig(): 'here': config_path, '__file__': config_filename,} +def test_appconfig_filter_with(): + conf = appconfig('config:test_filter_with.ini', relative_to=config_path) + assert conf['example'] == 'test' + def test_global_conf(): conf = appconfig(ini_file, relative_to=here, name='test_global_conf', global_conf={'def2': 'TEST DEF 2', 'inherit': 'bazbar'}) pprint(conf) |