diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-21 13:18:58 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-21 13:18:58 +0200 |
commit | a11b4d01a8d3d77fae89914fb0950d5fbb3b86b1 (patch) | |
tree | ad3693a956762d3481c9da49a14b3c6b4446dde3 /module/plugins/Plugin.py | |
parent | fixes (diff) | |
download | pyload-a11b4d01a8d3d77fae89914fb0950d5fbb3b86b1.tar.xz |
adaptions for win build
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 210b1b7ff..31aae2ee9 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -29,6 +29,7 @@ from random import randint import sys from os.path import exists +from os import remove from os import makedirs from tempfile import NamedTemporaryFile @@ -203,10 +204,10 @@ class Plugin(object): content = self.load(url, get=get, post=post, cookies=cookies) temp = NamedTemporaryFile() + temp = open("tmpCaptcha_%s" % self.__name__, "wb") - f = temp.file - f.write(content) - f.flush() + temp.write(content) + temp.close() Ocr = self.core.pluginManager.getCaptchaPlugin(self.__name__) @@ -232,6 +233,7 @@ class Plugin(object): result = task.getResult() task.removeTask() + remove(temp.name) #temp.unlink(temp.name) return result |