diff options
-rw-r--r-- | paste/deploy/compat.py | 2 | ||||
-rw-r--r-- | paste/deploy/loadwsgi.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/paste/deploy/compat.py b/paste/deploy/compat.py index f7b93f5..bd2063f 100644 --- a/paste/deploy/compat.py +++ b/paste/deploy/compat.py @@ -17,6 +17,7 @@ if sys.version_info < (3, 0): from ConfigParser import ConfigParser from urllib import unquote iteritems = lambda d: d.iteritems() + dictkeys = lambda d: d.keys() def reraise(t, e, tb): exec('raise t, e, tb', dict(t=t, e=e, tb=tb)) @@ -25,6 +26,7 @@ else: from configparser import ConfigParser from urllib.parse import unquote iteritems = lambda d: d.items() + dictkeys = lambda d: list(d.keys()) def reraise(t, e, tb): exec('raise e from tb', dict(e=e, tb=tb)) diff --git a/paste/deploy/loadwsgi.py b/paste/deploy/loadwsgi.py index 66046c7..8b2849d 100644 --- a/paste/deploy/loadwsgi.py +++ b/paste/deploy/loadwsgi.py @@ -7,7 +7,7 @@ import re import pkg_resources -from paste.deploy.compat import ConfigParser, unquote, iteritems +from paste.deploy.compat import ConfigParser, unquote, iteritems, dictkeys from paste.deploy.util import fix_call, lookup_object __all__ = ['loadapp', 'loadserver', 'loadfilter', 'appconfig'] @@ -655,7 +655,7 @@ class EggLoader(_Loader): dist.location, ', '.join(_flatten(object_type.egg_protocols)), ', '.join(_flatten([ - (pkg_resources.get_entry_info(self.spec, prot, name) or {}).keys() + dictkeys(pkg_resources.get_entry_info(self.spec, prot, name) or {}) for prot in protocol_options] or '(no entry points)')))) if len(possible) > 1: raise LookupError( |