diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-12 10:05:42 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-12 10:05:42 +0000 |
commit | 8ef5e3201c2dfbcdd80190691427300dc35428be (patch) | |
tree | 7506b771c84ae2c4015ae735d4d82855b3048101 | |
parent | d62dcb6b015918a6ddbba2e17f6d698f0ac6850e (diff) |
Don't handle BaseException in build scripts
-rw-r--r-- | SConstruct | 4 | ||||
-rw-r--r-- | core/SCsub | 2 | ||||
-rw-r--r-- | methods.py | 2 | ||||
-rw-r--r-- | modules/webm/libvpx/SCsub | 2 | ||||
-rw-r--r-- | platform/android/detect.py | 2 | ||||
-rw-r--r-- | platform/javascript/detect.py | 4 | ||||
-rw-r--r-- | platform/windows/detect.py | 2 |
7 files changed, 8 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct index 10f961cff8..6aeb79e483 100644 --- a/SConstruct +++ b/SConstruct @@ -530,13 +530,13 @@ if selected_platform in platform_list: doc_path = config.get_doc_path() for c in doc_classes: env.doc_class_path[c] = path + "/" + doc_path - except: + except Exception: pass # Get icon paths (if present) try: icons_path = config.get_icons_path() env.module_icons_paths.append(path + "/" + icons_path) - except: + except Exception: # Default path for module icons env.module_icons_paths.append(path + "/" + "icons") modules_enabled[name] = path diff --git a/core/SCsub b/core/SCsub index 78a4395619..45918fb520 100644 --- a/core/SCsub +++ b/core/SCsub @@ -25,7 +25,7 @@ if "SCRIPT_AES256_ENCRYPTION_KEY" in os.environ: txts = "0x" + e[i * 2 : i * 2 + 2] try: int(txts, 16) - except: + except Exception: ec_valid = False txt += txts if not ec_valid: diff --git a/methods.py b/methods.py index f7134b472b..15eb82ae74 100644 --- a/methods.py +++ b/methods.py @@ -843,7 +843,7 @@ def show_progress(env): try: with open(node_count_fname) as f: node_count_max = int(f.readline()) - except: + except Exception: pass cache_directory = os.environ.get("SCONS_CACHE") diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub index d0744fa313..67d3f1bebd 100644 --- a/modules/webm/libvpx/SCsub +++ b/modules/webm/libvpx/SCsub @@ -278,7 +278,7 @@ if webm_cpu_x86: try: yasm_found = True subprocess.Popen([yasm_path, "--version"], stdout=devnull, stderr=devnull).communicate() - except: + except Exception: yasm_found = False if yasm_found: break diff --git a/platform/android/detect.py b/platform/android/detect.py index 60d4146712..650606ff8b 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -334,6 +334,6 @@ def get_ndk_version(path): key_value = list(map(lambda x: x.strip(), line.split("="))) if key_value[0] == "Pkg.Revision": return key_value[1] - except: + except Exception: print("Could not read source prop file '%s'" % prop_file_path) return None diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 178088e234..7c39653669 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -50,9 +50,7 @@ def get_flags(): def configure(env): - try: - env["initial_memory"] = int(env["initial_memory"]) - except: + if not isinstance(env["initial_memory"], int): print("Initial memory must be a valid integer") sys.exit(255) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index ee13e3c774..859051ede9 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -95,7 +95,7 @@ def build_res_file(target, source, env): out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).communicate() if len(out[1]): return 1 - except: + except Exception: return 1 return 0 |