diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-17 18:29:50 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-24 22:42:29 +0200 |
commit | 164512b6a74c94a731fcee7435dce1ccfa2f71e7 (patch) | |
tree | 3f61d3b83f641070145b478f54522c4fe2e63691 /module/plugins/internal/Account.py | |
parent | Spare fixes (diff) | |
download | pyload-164512b6a74c94a731fcee7435dce1ccfa2f71e7.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/internal/Account.py')
-rw-r--r-- | module/plugins/internal/Account.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py index 0e2996aaa..0595da20b 100644 --- a/module/plugins/internal/Account.py +++ b/module/plugins/internal/Account.py @@ -106,8 +106,9 @@ class Account(Plugin): def updateAccounts(self, user, password=None, options={}): - """Updates account and return true if anything changed""" - + """ + Updates account and return true if anything changed + """ if user in self.accounts: self.accounts[user]['valid'] = True #: do not remove or accounts will not login if password: @@ -227,7 +228,9 @@ class Account(Plugin): def selectAccount(self): - """Returns an valid account name and data""" + """ + Returns an valid account name and data + """ usable = [] for user, data in self.accounts.iteritems(): if not data['valid']: @@ -290,14 +293,18 @@ class Account(Plugin): def scheduleRefresh(self, user, time=0, force=True): - """Add task to refresh account info to sheduler""" + """ + Add task to refresh account info to sheduler + """ self.logDebug("Scheduled Account refresh for %s in %s seconds." % (user, time)) self.core.scheduler.addJob(time, self.getAccountInfo, [user, force]) @lock def checkLogin(self, user): - """Checks if user is still logged in""" + """ + Checks if user is still logged in + """ if user in self.timestamps: if self.login_timeout > 0 and self.timestamps[user] + self.login_timeout * 60 < time.time(): self.logDebug("Reached login timeout for %s" % user) |