diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-19 18:46:14 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-19 18:46:14 +0000 |
| commit | 44a2e4d4ea63c1a55d77429e6905506db22a7a50 (patch) | |
| tree | 3fbe9c1b8c5cec2b77876c5fd00da36132b045bc /repoze/bfg/zcml.py | |
| parent | 1c02105e4fce880bca80e58be3191d2e1368596a (diff) | |
| download | pyramid-44a2e4d4ea63c1a55d77429e6905506db22a7a50.tar.gz pyramid-44a2e4d4ea63c1a55d77429e6905506db22a7a50.tar.bz2 pyramid-44a2e4d4ea63c1a55d77429e6905506db22a7a50.zip | |
Move renderer tests from zcml tests to configure tests.
Diffstat (limited to 'repoze/bfg/zcml.py')
| -rw-r--r-- | repoze/bfg/zcml.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py index 7d6e2a14b..7df36f460 100644 --- a/repoze/bfg/zcml.py +++ b/repoze/bfg/zcml.py @@ -353,31 +353,6 @@ class IResourceDirective(Interface): required=True) def resource(_context, to_override, override_with): - if to_override == override_with: - raise ConfigurationError('You cannot override a resource with itself') - - package = to_override - path = '' - if ':' in to_override: - package, path = to_override.split(':', 1) - - override_package = override_with - override_prefix = '' - if ':' in override_with: - override_package, override_prefix = override_with.split(':', 1) - - if path and path.endswith('/'): - if override_prefix and (not override_prefix.endswith('/')): - raise ConfigurationError( - 'A directory cannot be overridden with a file (put a slash ' - 'at the end of override_with if necessary)') - - if override_prefix and override_prefix.endswith('/'): - if path and (not path.endswith('/')): - raise ConfigurationError( - 'A file cannot be overridden with a directory (put a slash ' - 'at the end of to_override if necessary)') - reg = get_current_registry() config = get_configurator(reg) |
