diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-13 10:49:58 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-13 10:49:58 +0100 |
commit | 21a2805840d283f23e8dc0fded2fdc450de1fd8b (patch) | |
tree | a9c5a1680a42783d6e379d5b6d6fb340410579ca /module/plugins/Plugin.py | |
parent | Spare code cosmetics (diff) | |
download | pyload-21a2805840d283f23e8dc0fded2fdc450de1fd8b.tar.xz |
[Plugin] Some fixes by rlindner81
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 7bd29c9d6..120dc9a6e 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -295,7 +295,7 @@ class Plugin(Base): wait_time = int(seconds) + 1 wait_until = time() + wait_time - self.logDebug("Set waitUntil to: %f (previous: %f)" % (wait_until, self.self.pyfile.waitUntil), + self.logDebug("Set waitUntil to: %f (previous: %f)" % (wait_until, self.pyfile.waitUntil), "Wait: %d seconds" % wait_time) self.pyfile.waitUntil = wait_until @@ -317,9 +317,9 @@ class Plugin(Base): status = pyfile.status pyfile.setStatus("waiting") - self.logDebug("WAIT: %d seconds" % wait_time, - "WAITUNTIL: %f" % pyfile.waitUntil, - "RECONNECT: %s" % self.wantReconnect) + self.logDebug("WAIT: %d seconds" % seconds, + "WAITUNTIL: %f" % pyfile.waitUntil, + "RECONNECT: %s" % self.wantReconnect) if not account: self.logDebug("Ignore reconnection due account logged") @@ -521,7 +521,9 @@ class Plugin(Base): with open(framefile, "wb") as f: del frame #: delete the frame or it wont be cleaned - f.write(fs_encode(res)) + if decode: + res = res.encode('utf-8') + f.write(res) except IOError, e: self.logError(e) |