aboutsummaryrefslogtreecommitdiff
path: root/src/prepaid-manager-applet.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-02-15 13:41:17 +0100
committerGuido Günther <agx@sigxcpu.org>2014-02-15 13:48:20 +0100
commit9cf173763b4d21178276f228feceb799b0ce12c6 (patch)
treeec129e4376c34eb3a13f113dbf6a1e98f7c44aba /src/prepaid-manager-applet.py
parentcd54f18e6862dc38692ad857006dbc5494f94776 (diff)
Catch error to list modems
Diffstat (limited to 'src/prepaid-manager-applet.py')
-rwxr-xr-xsrc/prepaid-manager-applet.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py
index 29d90a9..22464e0 100755
--- a/src/prepaid-manager-applet.py
+++ b/src/prepaid-manager-applet.py
@@ -194,7 +194,11 @@ class PPMController(GObject.GObject):
self.mm = ModemManagerProxy()
self._connect_mm_signals()
- modems = self.mm.get_modems()
+ try:
+ modems = self.mm.get_modems()
+ except ModemError as e:
+ logging.error("%s" % e.msg)
+ modems = None
if modems:
modem = modems[0] # FIXME: handle multiple modems
logging.debug("Using modem %s" % modem)