From 9327b55e147d95b5865f23788f980c7268ea03e3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 20 Apr 2015 21:38:42 +0200 Subject: Spare code cosmetics (7) --- pyload/plugin/Account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyload/plugin/Account.py') diff --git a/pyload/plugin/Account.py b/pyload/plugin/Account.py index c46eae5e3..f025170b3 100644 --- a/pyload/plugin/Account.py +++ b/pyload/plugin/Account.py @@ -260,7 +260,7 @@ class Account(Base): def canUse(self): - return False if self.selectAccount() == (None, None) else True + return self.selectAccount() != (None, None) def parseTraffic(self, value, unit=None): #: return bytes -- cgit v1.2.3 From 892b7cbd4981b764bed30b2ccc5ca73d791c39f2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 20 Apr 2015 22:56:34 +0200 Subject: Spare code cosmetics (9) --- pyload/plugin/Account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyload/plugin/Account.py') diff --git a/pyload/plugin/Account.py b/pyload/plugin/Account.py index f025170b3..fda76a78f 100644 --- a/pyload/plugin/Account.py +++ b/pyload/plugin/Account.py @@ -96,7 +96,7 @@ class Account(Base): req.cj.clear() req.close() if user in self.infos: - del self.infos[user] # delete old information + del self.infos[user] #: delete old information return self._login(user, self.accounts[user]) @@ -112,7 +112,7 @@ class Account(Base): """ 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 + self.accounts[user]['valid'] = True #: do not remove or accounts will not login if password: self.accounts[user]['password'] = password self.relogin(user) -- cgit v1.2.3