Fix #1617 (pdftrim bad error checking)

This commit is contained in:
Kovid Goyal 2009-01-14 12:44:10 -08:00
parent 0a1b6ccd26
commit a1a86d8e13

View File

@ -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' )