diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 684dfc41dbe..e4862287cbe 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -475,7 +475,7 @@ class MachCommands(CommandBase): if os.path.exists(crate_path): try: delete(crate_path) - except (FileNotFoundError, PermissionError): + except Exception: print(traceback.format_exc()) print("Delete %s failed!" % crate_path) else: diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 3a4f05729ed..e152c02683e 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -920,7 +920,7 @@ def package_gstreamer_dlls(env, servo_exe_dir, target, uwp): for gst_lib in gst_dlls: try: shutil.copy(path.join(gst_root, "bin", gst_lib), servo_exe_dir) - except FileNotFoundError: + except Exception: missing += [str(gst_lib)] for gst_lib in missing: @@ -976,7 +976,7 @@ def package_gstreamer_dlls(env, servo_exe_dir, target, uwp): for gst_lib in gst_dlls: try: shutil.copy(path.join(gst_plugin_path, gst_lib), servo_exe_dir) - except FileNotFoundError: + except Exception: missing += [str(gst_lib)] for gst_lib in missing: diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 5e89af3fd47..47fe9abd91a 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -537,7 +537,7 @@ class CommandBase(object): try: if check_gstreamer_lib(): return False - except (FileNotFoundError, WindowsError): + except Exception: # Some systems don't have pkg-config; we can't probe in this case # and must hope for the best return False diff --git a/python/tidy/setup.py b/python/tidy/setup.py index c6fe447fe1a..dddb7f01f0f 100644 --- a/python/tidy/setup.py +++ b/python/tidy/setup.py @@ -26,13 +26,13 @@ here = os.path.dirname(os.path.abspath(__file__)) try: with open(os.path.join(here, 'README.rst')) as doc: readme = doc.read() -except FileNotFoundError: +except Exception: readme = '' try: with open(os.path.join(here, 'HISTORY.rst')) as doc: history = doc.read() -except FileNotFoundError: +except Exception: history = '' long_description = readme + '\n\n' + history