Use sys.exc_info()

This commit is contained in:
Andrew M. Kuchling 2006-07-26 18:15:45 +00:00
parent 44c668d15e
commit ab26004923
1 changed files with 2 additions and 1 deletions

View File

@ -760,7 +760,8 @@ class MyURLopener(urllib.FancyURLopener):
try:
names = os.listdir(path)
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()
s = MyStringIO("file:"+url, {'content-type': 'text/html'})
s.write('<BASE HREF="file:%s">\n' %