summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Haritonsky <vharitonsky@gmail.com>2020-01-09 14:32:36 +0200
committerChris Dent <cdent@anticdent.org>2020-01-09 12:32:36 +0000
commit3d3aaf9a896dfac3f29693b6c7fea61c494e4fce (patch)
tree88272488197e118ce3200f0c612b8a52f51772e8
parente48732cd002d0a30b7382909f20cc45aa1616e53 (diff)
downloadpaste-git-3d3aaf9a896dfac3f29693b6c7fea61c494e4fce.tar.gz
python3 compatibility issues: list + keys concatenation, bool check (#42)
-rw-r--r--paste/registry.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/paste/registry.py b/paste/registry.py
index 908bc0d..e218e03 100644
--- a/paste/registry.py
+++ b/paste/registry.py
@@ -125,7 +125,7 @@ class StackedObjectProxy(object):
"""Return a list of the StackedObjectProxy's and proxied
object's (if one exists) names.
"""
- dir_list = dir(self.__class__) + self.__dict__.keys()
+ dir_list = dir(self.__class__) + list(self.__dict__.keys())
try:
dir_list.extend(dir(self._current_obj()))
except TypeError:
@@ -165,6 +165,9 @@ class StackedObjectProxy(object):
def __iter__(self):
return iter(self._current_obj())
+ def __bool__(self):
+ return bool(self._current_obj())
+
def __len__(self):
return len(self._current_obj())