diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:47:16 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:47:16 +0100 |
commit | a1158cf8f4d4e59988e5deea2bf28fb742dd716f (patch) | |
tree | 4cc6999c1a7aa27a8c7370233d3111ec4b8aea11 /paste/registry.py | |
parent | bc2d48c473952247fe26c7058cb1a8ec746ff1d8 (diff) | |
download | paste-a1158cf8f4d4e59988e5deea2bf28fb742dd716f.tar.gz |
Python 3: Replace "for ... in dict.items()" with "for ... in six.iteritems(dict)"
Same change for itervalues().
Diffstat (limited to 'paste/registry.py')
-rw-r--r-- | paste/registry.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/paste/registry.py b/paste/registry.py index 4c0e2b0..61a5d13 100644 --- a/paste/registry.py +++ b/paste/registry.py @@ -89,6 +89,7 @@ is provided solely in the extremely rare case that it is an issue so that a quick way to work around it is documented. """ +import six import sys import paste.util.threadinglocal as threadinglocal @@ -345,7 +346,7 @@ class Registry(object): def cleanup(self): """Remove all objects from all StackedObjectProxy instances that were tracked at this Registry context""" - for stacked, obj in self.reglist[-1].itervalues(): + for stacked, obj in six.itervalues(self.reglist[-1]): stacked._pop_object(obj) self.reglist.pop() @@ -505,7 +506,7 @@ class StackedObjectRestorer(object): # their methods to act differently when a restoration context is active # in the current thread for reglist in registry.reglist: - for stacked, obj in reglist.itervalues(): + for stacked, obj in six.itervalues(reglist): self.enable_restoration(stacked) def get_saved_proxied_obj(self, stacked, request_id): |