diff options
author | 2015-04-18 14:08:18 +0200 | |
---|---|---|
committer | 2015-04-18 14:08:18 +0200 | |
commit | 6e8f84e1dc06cff6fa9387559992f555182c1774 (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/plugin/Account.py | |
parent | fix: config cast (diff) | |
parent | Spare code cosmetics (5) (diff) | |
download | pyload-6e8f84e1dc06cff6fa9387559992f555182c1774.tar.xz |
Merge pull request #3 from vuolter/0.4.10
merge vuolter HEAD
Diffstat (limited to 'pyload/plugin/Account.py')
-rw-r--r-- | pyload/plugin/Account.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pyload/plugin/Account.py b/pyload/plugin/Account.py index 23f15e8fd..c46eae5e3 100644 --- a/pyload/plugin/Account.py +++ b/pyload/plugin/Account.py @@ -166,7 +166,7 @@ class Account(Base): infos['timestamp'] = time() self.infos[name] = infos - elif "timestamp" in self.infos[name] and self.infos[name]["timestamp"] + self.info_threshold * 60 < time(): + elif "timestamp" in self.infos[name] and self.infos[name]['timestamp'] + self.info_threshold * 60 < time(): self.logDebug("Reached timeout for account data") self.scheduleRefresh(name) @@ -231,7 +231,8 @@ class Account(Base): """ returns an valid account name and data""" usable = [] for user, data in self.accounts.iteritems(): - if not data['valid']: continue + if not data['valid']: + continue if "time" in data['options'] and data['options']['time']: time_data = "" @@ -253,7 +254,8 @@ class Account(Base): usable.append((user, data)) - if not usable: return None, None + if not usable: + return None, None return choice(usable) |