mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1617 (pdftrim bad error checking)
This commit is contained in:
parent
0a1b6ccd26
commit
a1a86d8e13
@ -50,12 +50,16 @@ def main(args=sys.argv):
|
||||
except:
|
||||
print "Unable to read input"
|
||||
return 2
|
||||
title = _('Unknown')
|
||||
author = _('Unknown')
|
||||
try:
|
||||
info = input_pdf.getDocumentInfo()
|
||||
title = 'Unknown'
|
||||
author = 'Unknown'
|
||||
if info.title:
|
||||
title = info.title
|
||||
if info.author:
|
||||
author = info.author
|
||||
except:
|
||||
pass
|
||||
if opts.bounding != None:
|
||||
try:
|
||||
bounding = open( opts.bounding , 'r' )
|
||||
|
Loading…
x
Reference in New Issue
Block a user