aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/prepaid-manager-applet.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py
index a1084ff..622b16f 100755
--- a/src/prepaid-manager-applet.py
+++ b/src/prepaid-manager-applet.py
@@ -163,10 +163,15 @@ class PPMController(GObject.GObject):
self.mm.modem_enable(reply_func=self.init_account_and_provider)
return True
-
- if self._get_account_from_accountdb(self.imsi):
- # Since we have the account in the db we can safely
- # fetch the provider information from the providerdb
+ try:
+ account = self._get_account_from_accountdb(self.imsi)
+ except:
+ # Fetching account from the DB failed, so start over
+ account = None
+
+ if account:
+ # Since we have the account in the db we can safely fetch the
+ # provider information from the providerdb
self.providerdb.get_provider(self.account.name,
self.account.code)
else: