mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
[lit] Remove uses of deprecated except syntax.
- 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
This commit is contained in:
@@ -257,7 +257,8 @@ def executeScriptInternal(test, litConfig, tmpBase, commands, cwd):
|
|||||||
results = []
|
results = []
|
||||||
try:
|
try:
|
||||||
exitCode = executeShCmd(cmd, test.config, cwd, results)
|
exitCode = executeShCmd(cmd, test.config, cwd, results)
|
||||||
except InternalShellError,e:
|
except InternalShellError:
|
||||||
|
e = sys.exc_info()[1]
|
||||||
exitCode = 127
|
exitCode = 127
|
||||||
results.append((e.command, '', e.message, exitCode))
|
results.append((e.command, '', e.message, exitCode))
|
||||||
|
|
||||||
|
@@ -62,10 +62,11 @@ class TestingConfig:
|
|||||||
exec f in cfg_globals
|
exec f in cfg_globals
|
||||||
if litConfig.debug:
|
if litConfig.debug:
|
||||||
litConfig.note('... loaded config %r' % path)
|
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
|
# We allow normal system exit inside a config file to just
|
||||||
# return control without error.
|
# return control without error.
|
||||||
if status.args:
|
if e.args:
|
||||||
raise
|
raise
|
||||||
f.close()
|
f.close()
|
||||||
else:
|
else:
|
||||||
|
@@ -34,7 +34,8 @@ def mkdir_p(path):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
except OSError,e:
|
except OSError:
|
||||||
|
e = sys.exc_info()[1]
|
||||||
# Ignore EEXIST, which may occur during a race condition.
|
# Ignore EEXIST, which may occur during a race condition.
|
||||||
if e.errno != errno.EEXIST:
|
if e.errno != errno.EEXIST:
|
||||||
raise
|
raise
|
||||||
|
Reference in New Issue
Block a user