From 164512b6a74c94a731fcee7435dce1ccfa2f71e7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:29:50 +0200 Subject: Spare code cosmetics --- module/plugins/internal/Account.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'module/plugins/internal/Account.py') 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) -- cgit v1.2.3