diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-06 03:31:58 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-06 03:31:58 +0100 |
commit | e1981f7e97ee79b08205a9f9a7367867b847d49a (patch) | |
tree | 4a859c2f63b98da2f89b85b4f272ce6c829e9de9 /module/plugins/Plugin.py | |
parent | [XFSAccount] Fix premium & validuntil detection (diff) | |
download | pyload-e1981f7e97ee79b08205a9f9a7367867b847d49a.tar.xz |
[Plugin] Don't use reconnection if account was logged
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index bf051a33f..a74a95e78 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -127,7 +127,7 @@ class Base(object): def getStorage(self, key=None, default=None): """ Retrieves saved value or dict of all saved entries if key is None """ - if key is not None: + if key: return self.core.db.getStorage(self.__name__, key) or default return self.core.db.getStorage(self.__name__, key) @@ -289,7 +289,7 @@ class Plugin(Base): :param seconds: wait time in seconds :param reconnect: True if a reconnect would avoid wait time """ - if reconnect is not None: + if reconnect and not self.account: self.wantReconnect = bool(reconnect) self.pyfile.waitUntil = time() + int(seconds) + 1 @@ -308,6 +308,7 @@ class Plugin(Base): if self.pyfile.abort: raise Abort + if self.thread.m.reconnecting.isSet(): self.waiting = False self.wantReconnect = False |