pumazi/wsgi_intercept2 — Issue #7: 7 - Missing import masks exceptions in httplib2_intercept 
Author: pumazi
Created: 2011-12-22 19:25:14+00:00
State: open

What steps will reproduce the problem?
1. Run the attached traceback_import_bug.py

What is the expected output? What do you see instead?

Expect an error because I gave httplib2 a bogus hostname. Instead I get:

Traceback (most recent call last):
File "traceback_repro.py", line 4, in <module>
httplib2_intercept.HTTP_WSGIInterceptorWithTimeout("123").connect()
File
"/Users/grb/temp/wsgi-intercept/wsgi_intercept/httplib2_intercept.py", line
39, in connect
traceback.print_exc()
NameError: global name 'traceback' is not defined

What version of the product are you using? On what operating system?

svn rev 34

Please provide any additional information below.

This only happens when debuglevel is non-zero, which is probably why it
lived so long. The attached one-line patch fixes it.

Original link: http://code.google.com/p/wsgi-intercept/issues/detail?id=7