Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use except Exception where Py2/3 disagrees
  • Loading branch information
saschanaz committed Jun 21, 2020
1 parent d01648d commit 57eed5b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/servo/bootstrap_commands.py
Expand Up @@ -475,7 +475,7 @@ def get_size(path):
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:
Expand Down
4 changes: 2 additions & 2 deletions python/servo/build_commands.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion python/servo/command_base.py
Expand Up @@ -537,7 +537,7 @@ def needs_gstreamer_env(self, target, env, uwp=False, features=[]):
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
Expand Down
4 changes: 2 additions & 2 deletions python/tidy/setup.py
Expand Up @@ -26,13 +26,13 @@
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
Expand Down

0 comments on commit 57eed5b

Please sign in to comment.