diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-08-09 14:58:21 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-08-09 14:58:21 +0000 |
| commit | 2a591a5f56222d7ee407a22acbe2d9cd0102373f (patch) | |
| tree | 1db988b93f77020fa81116d750552375f6ebbf82 | |
| parent | b474b5af1069c24384343766c8bfb6768a8a9520 (diff) | |
| download | pyramid-2a591a5f56222d7ee407a22acbe2d9cd0102373f.tar.gz pyramid-2a591a5f56222d7ee407a22acbe2d9cd0102373f.tar.bz2 pyramid-2a591a5f56222d7ee407a22acbe2d9cd0102373f.zip | |
fix in case dotted is tuple
| -rw-r--r-- | repoze/bfg/configuration.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index 0ab4abcb5..ff41b433e 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -2421,7 +2421,7 @@ class DottedNameResolver(object): if value.startswith('.') or value.startswith(':'): if not self.package: raise ConfigurationError( - 'relative name %r irresolveable without package' % value) + 'relative name %r irresolveable without package' % (value,)) if value in ['.', ':']: value = self.package.__name__ else: @@ -2435,7 +2435,7 @@ class DottedNameResolver(object): if value == '.': if self.package is None: raise ConfigurationError( - 'relative name %r irresolveable without package' % value) + 'relative name %r irresolveable without package' % (value,)) name = module.split('.') else: name = value.split('.') @@ -2443,7 +2443,7 @@ class DottedNameResolver(object): if module is None: raise ConfigurationError( 'relative name %r irresolveable without ' - 'package' % value + 'package' % (value,) ) module = module.split('.') name.pop(0) @@ -2466,7 +2466,7 @@ class DottedNameResolver(object): def __call__(self, dotted): if not isinstance(dotted, basestring): - raise ConfigurationError('%r is not a string' % dotted) + raise ConfigurationError('%r is not a string' % (dotted,)) try: if ':' in dotted: return self._pkg_resources_style(dotted) @@ -2474,4 +2474,4 @@ class DottedNameResolver(object): return self._zope_dottedname_style(dotted) except ImportError: raise ConfigurationError( - 'The dotted name %r cannot be imported' % dotted) + 'The dotted name %r cannot be imported' % (dotted,)) |
