summaryrefslogtreecommitdiff
path: root/paste/cgitb_catcher.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-05-17 03:06:22 +0000
committerianb <devnull@localhost>2005-05-17 03:06:22 +0000
commited51c888895583a856f40ce951c0c131a26f9ca3 (patch)
tree8f56068ec37a20406eab36c1f4a86ff233a5ddb8 /paste/cgitb_catcher.py
parenta3ce49f606ece7bfc639a7d27fa6a4c50b0b8b37 (diff)
downloadpaste-ed51c888895583a856f40ce951c0c131a26f9ca3.tar.gz
A bunch of pylint-inspired changes; all minor code cleanup
Diffstat (limited to 'paste/cgitb_catcher.py')
-rw-r--r--paste/cgitb_catcher.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/paste/cgitb_catcher.py b/paste/cgitb_catcher.py
index 732f7e1..b417583 100644
--- a/paste/cgitb_catcher.py
+++ b/paste/cgitb_catcher.py
@@ -9,7 +9,6 @@ documentation for more:
import cgitb
from cStringIO import StringIO
import sys
-import traceback
class DummyFile(object):
pass
@@ -24,7 +23,7 @@ def middleware(application, **kw):
return started[0]
try:
- app_iter = application(environ, start_response)
+ app_iter = application(environ, detect_start_response)
return catching_iter(app_iter)
except:
if not started:
@@ -40,12 +39,12 @@ def middleware(application, **kw):
hook(*sys.exc_info())
return [dummy_file.getvalue()]
- def catching_iter(iter):
- if not iter:
+ def catching_iter(app_iter):
+ if not app_iter:
raise StopIteration
try:
- for v in iter:
- yield iter
+ for v in app_iter:
+ yield v
except:
exc = sys.exc_info()
dummy_file = StringIO()