- Since we only have a few of these, use the cumbersome method of getting the
exception object from 'sys' to retain the current pre-2.6 compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187854
91177308-0d34-0410-b5e6-
96231b3b80d8
results = []
try:
exitCode = executeShCmd(cmd, test.config, cwd, results)
- except InternalShellError,e:
+ except InternalShellError:
+ e = sys.exc_info()[1]
exitCode = 127
results.append((e.command, '', e.message, exitCode))
exec f in cfg_globals
if litConfig.debug:
litConfig.note('... loaded config %r' % path)
- except SystemExit,status:
+ except SystemExit:
+ e = sys.exc_info()[1]
# We allow normal system exit inside a config file to just
# return control without error.
- if status.args:
+ if e.args:
raise
f.close()
else:
try:
os.mkdir(path)
- except OSError,e:
+ except OSError:
+ e = sys.exc_info()[1]
# Ignore EEXIST, which may occur during a race condition.
if e.errno != errno.EEXIST:
raise