From 96df28dcaf2f71d95f182d91aaccd7f8aabec3a6 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 30 Aug 2007 02:13:39 -0400 Subject: [PATCH] Don't traceback on systems without the right NM --- shell/hardware/nmclient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py index fa77fd6c..b14277ef 100644 --- a/shell/hardware/nmclient.py +++ b/shell/hardware/nmclient.py @@ -321,12 +321,13 @@ class Device(gobject.GObject): return ret def get_frequency(self): + freq = 0.0 try: freq = self.dev.getFrequency(timeout=3000) except dbus.DBusException, e: pass # Hz -> GHz - self._freq = freq / 1000000000 + self._freq = freq / 1000000000.0 return self._freq def get_strength(self):