summaryrefslogtreecommitdiffstats
path: root/module/plugins/captcha/captcha.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/captcha/captcha.py')
-rw-r--r--module/plugins/captcha/captcha.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py
index eec63b54f..db229c747 100644
--- a/module/plugins/captcha/captcha.py
+++ b/module/plugins/captcha/captcha.py
@@ -22,6 +22,7 @@ import logging
import subprocess
import tempfile
import threading
+from os import remove
import Image
@@ -105,7 +106,8 @@ class OCR(object):
tmpSub.write("\n")
tessparams.append("nobatch")
tessparams.append(tmpSub.name)
-
+ tmpSub.flush()
+
self.logger.debug("run tesseract")
self.run(tessparams)
self.logger.debug("read txt")