summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-12 10:05:42 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-12 10:05:42 +0000
commit8ef5e3201c2dfbcdd80190691427300dc35428be (patch)
tree7506b771c84ae2c4015ae735d4d82855b3048101 /platform
parentd62dcb6b015918a6ddbba2e17f6d698f0ac6850e (diff)
Don't handle BaseException in build scripts
Diffstat (limited to 'platform')
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/javascript/detect.py4
-rw-r--r--platform/windows/detect.py2
3 files changed, 3 insertions, 5 deletions
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