Use sys.exc_info()
This commit is contained in:
parent
44c668d15e
commit
ab26004923
|
@ -760,7 +760,8 @@ class MyURLopener(urllib.FancyURLopener):
|
||||||
try:
|
try:
|
||||||
names = os.listdir(path)
|
names = os.listdir(path)
|
||||||
except os.error, msg:
|
except os.error, msg:
|
||||||
raise IOError, msg, sys.exc_traceback
|
exc_type, exc_value, exc_tb = sys.exc_info()
|
||||||
|
raise IOError, msg, exc_tb
|
||||||
names.sort()
|
names.sort()
|
||||||
s = MyStringIO("file:"+url, {'content-type': 'text/html'})
|
s = MyStringIO("file:"+url, {'content-type': 'text/html'})
|
||||||
s.write('<BASE HREF="file:%s">\n' %
|
s.write('<BASE HREF="file:%s">\n' %
|
||||||
|
|
Loading…
Reference in New Issue