Tidy some if condition -> EAFP

This commit is contained in:
James R. Barlow
2022-06-11 00:21:21 -07:00
parent a0ac448d52
commit d640c2ded3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ def run(args=None):
log.error(e)
return ExitCode.missing_dependency
if hasattr(signal, 'SIGBUS'):
with suppress(AttributeError, OSError):
signal.signal(signal.SIGBUS, sigbus)
result = run_pipeline(options=options, plugin_manager=plugin_manager)
+1 -1
View File
@@ -266,7 +266,7 @@ def extract_images(
if image.objgen[1] != 0:
continue # Ignore images in an incremental PDF
xref = Xref(image.objgen[0])
if hasattr(image, 'SMask'):
if Name.SMask in image:
# Ignore soft masks
smask_xref = Xref(image.SMask.objgen[0])
exclude_xrefs.add(smask_xref)