From 8ef5e3201c2dfbcdd80190691427300dc35428be Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sat, 12 Dec 2020 10:05:42 +0000 Subject: Don't handle BaseException in build scripts --- platform/android/detect.py | 2 +- platform/javascript/detect.py | 4 +--- platform/windows/detect.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'platform') 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 -- cgit v1.2.3