diff options
author | Nils Philippsen <nils@redhat.com> | 2015-09-09 11:09:59 +0200 |
---|---|---|
committer | Nils Philippsen <nils@redhat.com> | 2015-09-09 11:09:59 +0200 |
commit | 75020c5f92846963892798514df48d8a2ad6b8a5 (patch) | |
tree | c8794fc89f9c09a6ff70fcca1f5388473a5addef | |
parent | e429aea5bc693ffb50b7cdaefd0a6e24ead2afa1 (diff) | |
download | paste-75020c5f92846963892798514df48d8a2ad6b8a5.tar.gz |
Python 3: avoid spurious warnings
The dict.has_keys() method doesn't exist anymore in python 3, check if
the locals() object has a .keys() method instead.
-rw-r--r-- | paste/exceptions/collector.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paste/exceptions/collector.py b/paste/exceptions/collector.py index 8867bf7..632ce06 100644 --- a/paste/exceptions/collector.py +++ b/paste/exceptions/collector.py @@ -266,7 +266,7 @@ class ExceptionCollector(object): name = co.co_name globals = f.f_globals locals = f.f_locals - if not hasattr(locals, 'has_key'): + if not hasattr(locals, 'keys'): # Something weird about this frame; it's not a real dict warnings.warn( "Frame %s has an invalid locals(): %r" % ( |