diff options
author | ianb <devnull@localhost> | 2007-04-06 16:24:14 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2007-04-06 16:24:14 +0000 |
commit | 2013650a6e21d572ab5f67a5d52efedd2e5b03d8 (patch) | |
tree | ae1d6fe5f1b404aabe6812844b317c1a79d5fe0b /paste | |
parent | e894ce17cea713c1963d7d953e1fa2ffcdce7388 (diff) | |
download | paste-2013650a6e21d572ab5f67a5d52efedd2e5b03d8.tar.gz |
Added StackedObjectProxy._object_stack()
Diffstat (limited to 'paste')
-rw-r--r-- | paste/registry.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/paste/registry.py b/paste/registry.py index a58ac6f..41c1d8f 100644 --- a/paste/registry.py +++ b/paste/registry.py @@ -214,6 +214,16 @@ class StackedObjectProxy(object): 'The object popped (%s) is not the same as the object ' 'expected (%s)' % (popped, obj)) + def _object_stack(self): + """Returns all of the objects stacked in this container + + (Might return [] if there are none) + """ + try: + return self.____local__.objects[:] + except AssertionError: + return [] + # The following methods will be swapped for their original versions by # StackedObjectRestorer when restoration is enabled. The original # functions (e.g. _current_obj) will be available at _current_obj_orig |