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:
|
except:
|
||||||
print "Unable to read input"
|
print "Unable to read input"
|
||||||
return 2
|
return 2
|
||||||
info = input_pdf.getDocumentInfo()
|
title = _('Unknown')
|
||||||
title = 'Unknown'
|
author = _('Unknown')
|
||||||
author = 'Unknown'
|
try:
|
||||||
if info.title:
|
info = input_pdf.getDocumentInfo()
|
||||||
title = info.title
|
if info.title:
|
||||||
author = info.author
|
title = info.title
|
||||||
|
if info.author:
|
||||||
|
author = info.author
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if opts.bounding != None:
|
if opts.bounding != None:
|
||||||
try:
|
try:
|
||||||
bounding = open( opts.bounding , 'r' )
|
bounding = open( opts.bounding , 'r' )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user