diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-28 19:10:23 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-28 19:10:23 +0000 |
| commit | 4d534ed4224261529550c53b81628a685facdc46 (patch) | |
| tree | 0d88ed5dabee358236d6ae9102c0cfadf4086c43 /repoze/bfg/zcml.py | |
| parent | 07a723720d1fea85ec7d0629324c015712b16b4e (diff) | |
| download | pyramid-4d534ed4224261529550c53b81628a685facdc46.tar.gz pyramid-4d534ed4224261529550c53b81628a685facdc46.tar.bz2 pyramid-4d534ed4224261529550c53b81628a685facdc46.zip | |
Allow initial registry setup to be called via a ``setup_registry`` method.
Allow path specifications for renderers which are already resource specifications.
Diffstat (limited to 'repoze/bfg/zcml.py')
| -rw-r--r-- | repoze/bfg/zcml.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py index 41945c448..3ccfff66c 100644 --- a/repoze/bfg/zcml.py +++ b/repoze/bfg/zcml.py @@ -1,3 +1,5 @@ +import os + from zope.configuration import xmlconfig from zope.configuration.config import ConfigurationMachine from zope.configuration.exceptions import ConfigurationError @@ -760,6 +762,9 @@ def path_spec(context, path): # absolute path; we prefer registering resource specifications # over absolute paths because these can be overridden by the # resource directive. + if ':' in path and not os.path.isabs(path): + # it's already a resource specification + return path abspath = context.path(path) if hasattr(context, 'package') and context.package: package = context.package |
