mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Use sys.exc_info()
This commit is contained in:
parent
44c668d15e
commit
ab26004923
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue