Fix error handling for pdfs whose info cannot be read

master
Dan Howe 7 years ago
parent 661a6663c8
commit 0186e2551e

@ -116,8 +116,12 @@ def pdf_unlock(pdf_file, overwrite=False):
return return
# Skip file if it is not encrypted # Skip file if it is not encrypted
try:
if not isencrypted(pdf_file): if not isencrypted(pdf_file):
return return
# SKip file if pdf info cannot be read
except AttributeError:
return
# Get name of Ghostscript executable # Get name of Ghostscript executable
if os.sys.platform == 'win32': if os.sys.platform == 'win32':

Loading…
Cancel
Save