diff options
-rw-r--r-- | module/CaptchaManager.py | 7 | ||||
-rw-r--r-- | module/PluginThread.py | 4 | ||||
-rw-r--r-- | module/network/HTTPRequest.py | 2 | ||||
-rw-r--r-- | module/plugins/Plugin.py | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py index d6a8fd077..d9e3748d7 100644 --- a/module/CaptchaManager.py +++ b/module/CaptchaManager.py @@ -83,7 +83,12 @@ class CaptchaTask(): self.lock.release() def getResult(self): - return self.result + try: + res = self.result.encode("utf8", "replace") + except: + res = self.result + + return res def getID(self): return self.id diff --git a/module/PluginThread.py b/module/PluginThread.py index 216f59853..311d80ba4 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -71,6 +71,10 @@ class PluginThread(Thread): dump += pformat(value) + "\n" except Exception, e: dump += "<ERROR WHILE PRINTING VALUE> "+ str(e) +"\n" + + del frame + + del stack #delete it just to be sure... dump += "\n\nPLUGIN OBJECT DUMP: \n\n" diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index ebb3c3177..fe4a577b6 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -65,7 +65,7 @@ class HTTPRequest(): self.c.setopt(pycurl.AUTOREFERER, 1) self.c.setopt(pycurl.SSL_VERIFYPEER, 0) self.c.setopt(pycurl.LOW_SPEED_TIME, 30) - self.c.setopt(pycurl.LOW_SPEED_LIMIT, 100) + self.c.setopt(pycurl.LOW_SPEED_LIMIT, 5) #self.c.setopt(pycurl.VERBOSE, 1) diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index e237d52c8..f66a53bdc 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -294,6 +294,8 @@ class Plugin(object): makedirs(join("tmp", self.__name__)) f = open(join("tmp", self.__name__, "%s_line%s.dump.html" % (frame.f_back.f_code.co_name, frame.f_back.f_lineno)), "wb") + del frame # delete the frame or it wont be cleaned + try: tmp = res.encode("utf8") except: |