aboutsummaryrefslogtreecommitdiff
path: root/src/ppm/accountdb.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-03-31 15:38:20 +0200
committerGuido Günther <agx@sigxcpu.org>2020-03-31 15:48:08 +0200
commit5d99bc157bcce346550a633a2c4a567690840b9c (patch)
tree6bded0e34fefd880fba775777af7734e32bf55a5 /src/ppm/accountdb.py
parent3b64786674e5adeffa23748b967550bbd24f8412 (diff)
accountdb: Make flake8 happy
Diffstat (limited to 'src/ppm/accountdb.py')
-rw-r--r--src/ppm/accountdb.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ppm/accountdb.py b/src/ppm/accountdb.py
index 4b70a2a..283a913 100644
--- a/src/ppm/accountdb.py
+++ b/src/ppm/accountdb.py
@@ -19,6 +19,7 @@ from gi.repository import Gio
from gi.repository import GObject
import logging
+
class Account(GObject.GObject):
identifier = GObject.property(type=str,
nick='account identifier',
@@ -49,6 +50,7 @@ class Account(GObject.GObject):
self.props.balance = balance
self.props.timestamp = timestamp
+
GObject.type_register(Account)
@@ -77,7 +79,7 @@ class AccountDB(object):
phone other keys must be possible later
"""
return '%s%s/' % (self.accounts_path_prefix,
- self.imsi_to_identifier(imsi))
+ self.imsi_to_identifier(imsi))
@classmethod
def imsi_to_identifier(klass, imsi):
@@ -90,16 +92,16 @@ class AccountDB(object):
path = self._account_path(imsi)
account = Account()
- account.props.identifier = self.imsi_to_identifier(imsi)
+ account.props.identifier = self.imsi_to_identifier(imsi)
gsettings_account = Gio.Settings(self.PPM_GSETTINGS_ACCOUNT_ID, path)
gsettings_account.bind('provider', account, 'name',
- Gio.SettingsBindFlags.DEFAULT)
+ Gio.SettingsBindFlags.DEFAULT)
gsettings_account.bind('country', account, 'code',
- Gio.SettingsBindFlags.DEFAULT)
+ Gio.SettingsBindFlags.DEFAULT)
gsettings_account.bind('balance', account, 'balance',
- Gio.SettingsBindFlags.DEFAULT)
+ Gio.SettingsBindFlags.DEFAULT)
gsettings_account.bind('timestamp', account, 'timestamp',
- Gio.SettingsBindFlags.DEFAULT)
+ Gio.SettingsBindFlags.DEFAULT)
return account
def fetch(self, imsi):
@@ -133,5 +135,3 @@ class AccountDB(object):
account = self._bind_account(imsi)
account.props.name = provider.name
account.props.code = provider.country
-
-