Plug file descriptor leak
This commit is contained in:
@@ -111,6 +111,7 @@ def do_document_ocr(document):
|
|||||||
f.close()
|
f.close()
|
||||||
cleanup(ocr_output)
|
cleanup(ocr_output)
|
||||||
finally:
|
finally:
|
||||||
|
os.close(desc)
|
||||||
cleanup(filepath)
|
cleanup(filepath)
|
||||||
if imagefile:
|
if imagefile:
|
||||||
cleanup(imagefile)
|
cleanup(imagefile)
|
||||||
|
|||||||
Reference in New Issue
Block a user