OSDN Git Service

scons: use python3-compatible exceptions
authorEric Engestrom <eric.engestrom@imgtec.com>
Tue, 19 Sep 2017 13:09:01 +0000 (14:09 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Mon, 25 Sep 2017 11:05:47 +0000 (12:05 +0100)
These changes were generated using python's `2to3` tool.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
scons/crossmingw.py
scons/dxsdk.py
scons/llvm.py

index 3412945..609cd00 100644 (file)
@@ -83,7 +83,7 @@ def shlib_emitter(target, source, env):
     no_import_lib = env.get('no_import_lib', 0)
 
     if not dll:
-        raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
+        raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX"))
     
     if not no_import_lib and \
        not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
index 920cc2f..9657f58 100644 (file)
@@ -51,7 +51,7 @@ def generate(env):
     elif env['machine'] == 'x86_64':
         target_cpu = 'x64'
     else:
-        raise SCons.Errors.InternalError, "Unsupported target machine"
+        raise SCons.Errors.InternalError("Unsupported target machine")
 
     include_dir = os.path.join(dxsdk_root, 'Include')
     lib_dir = os.path.join(dxsdk_root, 'Lib', target_cpu)
index eaa2ecb..79118be 100644 (file)
@@ -50,7 +50,7 @@ def generate(env):
         llvm_dir = None
     else:
         if not os.path.isdir(llvm_dir):
-            raise SCons.Errors.InternalError, "Specified LLVM directory not found"
+            raise SCons.Errors.InternalError("Specified LLVM directory not found")
 
         if env['debug']:
             llvm_subdir = 'Debug'
@@ -61,7 +61,7 @@ def generate(env):
         if not os.path.isdir(llvm_bin_dir):
             llvm_bin_dir = os.path.join(llvm_dir, 'bin')
             if not os.path.isdir(llvm_bin_dir):
-                raise SCons.Errors.InternalError, "LLVM binary directory not found"
+                raise SCons.Errors.InternalError("LLVM binary directory not found")
 
         env.PrependENVPath('PATH', llvm_bin_dir)