Commit 424d7b85 authored by Jeremy Hylton's avatar Jeremy Hylton

Don't store the traceback object in a local variable.

This code was correct, because of the outer try/finally that set tb to
None.  This change localizes the handling of the traceback, so that
it's safety can be determined by local inspection.
parent c07c7fd7
...@@ -402,8 +402,8 @@ ...@@ -402,8 +402,8 @@
''' #' ''' #'
__rcs_id__='$Id: DT_In.py,v 1.55 2001/10/16 15:29:55 klm Exp $' __rcs_id__='$Id: DT_In.py,v 1.56 2001/10/22 19:48:23 jeremy Exp $'
__version__='$Revision: 1.55 $'[11:-2] __version__='$Revision: 1.56 $'[11:-2]
import sys import sys
from DT_Util import ParseError, parse_params, name_param, str from DT_Util import ParseError, parse_params, name_param, str
...@@ -646,9 +646,8 @@ class InClass: ...@@ -646,9 +646,8 @@ class InClass:
params['skip_unauthorized']): params['skip_unauthorized']):
if index==first: pkw['sequence-start']=0 if index==first: pkw['sequence-start']=0
continue continue
tb = sys.exc_info()[2]
raise ValidationError, '(item %s): %s' % ( raise ValidationError, '(item %s): %s' % (
index, vv), tb index, vv), sys.exc_info()[2]
else: else:
client = sequence[index] client = sequence[index]
...@@ -677,7 +676,6 @@ class InClass: ...@@ -677,7 +676,6 @@ class InClass:
result = ''.join(result) result = ''.join(result)
finally: finally:
tb = None
if cache: pop() if cache: pop()
pop() pop()
...@@ -747,9 +745,8 @@ class InClass: ...@@ -747,9 +745,8 @@ class InClass:
self.args['skip_unauthorized']): self.args['skip_unauthorized']):
if index==1: pkw['sequence-start']=0 if index==1: pkw['sequence-start']=0
continue continue
tb = sys.exc_info()[2]
raise ValidationError, '(item %s): %s' % ( raise ValidationError, '(item %s): %s' % (
index, vv), tb index, vv), sys.exc_info()[2]
else: else:
client = sequence[index] client = sequence[index]
...@@ -776,7 +773,6 @@ class InClass: ...@@ -776,7 +773,6 @@ class InClass:
result = ''.join(result) result = ''.join(result)
finally: finally:
tb = None
if cache: pop() if cache: pop()
pop() pop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment