Skip to content

Commit

Permalink
Smallish fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom committed May 11, 2012
1 parent cf67233 commit 81741ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ocropus-lattices
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ elif hasattr(cmodel,'coutputs'):
linerec.norejects = not options.rejects
else:
print "%s (%s): don't know what kind of model this is"%(options.model,cmodel)
sys.exit(1)

if len(options.parameter)>0: print options.parameter
for s in options.parameter:
Expand All @@ -118,6 +119,7 @@ def extract(t):
fname = t
image = ocrolib.read_image_gray(fname)
ocrolib.fcleanup(fname,options.suffix,["cseg","txt","costs","fst","lattice"])
assert linerec is not None,"failed to load line recognizer"

if options.display:
clf()
Expand All @@ -132,7 +134,7 @@ def extract(t):
return
except:
traceback.print_exc()
if not options.cont: die("internal error")
if not options.cont: die("internal error %s"%(linerec,))
return

s = linerec.bestpath()
Expand Down

0 comments on commit 81741ba

Please sign in to comment.