PEP8 style fixes

This commit is contained in:
richard 2013-04-28 17:08:47 +01:00
parent b2e1d35d49
commit 0d2e91996e

View file

@ -27,7 +27,6 @@ class Mega(object):
options = {} options = {}
self.options = options self.options = options
def login(self, email, password): def login(self, email, password):
self.login_user(email, password) self.login_user(email, password)
return self return self
@ -305,16 +304,16 @@ class Mega(object):
raise ValueError("Only one unit prefix can be specified") raise ValueError("Only one unit prefix can be specified")
unit_coef = 1 unit_coef = 1
if kilo: if kilo:
unit_coef = 1024 unit_coef = 1024
if mega: if mega:
unit_coef = 1048576 unit_coef = 1048576
if giga: if giga:
unit_coef = 1073741824 unit_coef = 1073741824
json_resp = self.api_request({'a': 'uq', 'xfer': 1, 'strg': 1}) json_resp = self.api_request({'a': 'uq', 'xfer': 1, 'strg': 1})
return { return {
'used': json_resp['cstrg'] / unit_coef, 'used': json_resp['cstrg'] / unit_coef,
'total': json_resp['mstrg'] / unit_coef, 'total': json_resp['mstrg'] / unit_coef,
} }
def get_balance(self): def get_balance(self):
""" """