Rev 240: Merge fix for local commits when network manager isn't available. in file:///data/jelmer/bzr-gtk/trunk/

Jelmer Vernooij jelmer at samba.org
Thu Jul 19 14:16:32 BST 2007


At file:///data/jelmer/bzr-gtk/trunk/

------------------------------------------------------------
revno: 240
revision-id: jelmer at samba.org-20070719131631-2ods52j02o0ni2ir
parent: jelmer at samba.org-20070719130918-s11nskqrwfdp32xe
parent: matkor at laptop-hp-20070719125726-ifbdjbwepvioejel
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Thu 2007-07-19 15:16:31 +0200
message:
  Merge fix for local commits when network manager isn't available.
modified:
  commit.py                      commit.py-20060721181724-0mfkrqwpsa09q1t3-3
    ------------------------------------------------------------
    revno: 235.1.1
    revision-id: matkor at laptop-hp-20070719125726-ifbdjbwepvioejel
    parent: jelmer at samba.org-20070716235003-2wqsg7sgyny2fly3
    committer: Mateusz Korniak <matkor at laptop-hp>
    branch nick: gtk
    timestamp: Thu 2007-07-19 14:57:26 +0200
    message:
      Fix for broken dbus detection if network is avaiable.
    modified:
      commit.py                      commit.py-20060721181724-0mfkrqwpsa09q1t3-3
=== modified file 'commit.py'
--- a/commit.py	2007-03-21 00:24:51 +0000
+++ b/commit.py	2007-07-19 13:16:31 +0000
@@ -153,9 +153,14 @@
                               '/org/freedesktop/NetworkManager')
                 dbus_iface = dbus.Interface(
                         proxy_obj, 'org.freedesktop.NetworkManager')
-                # 3 is the enum value for STATE_CONNECTED
-                self._check_local.set_active(dbus_iface.state() != 3)
-        
+                try:
+                    # 3 is the enum value for STATE_CONNECTED
+                    self._check_local.set_active(dbus_iface.state() != 3)
+                except dbus.DBusException, e:
+                    # Silently drop errors. While DBus may be 
+                    # available, NetworkManager doesn't necessarily have to be
+                    mutter("unable to get networkmanager state: %r" % e)
+                
         # Create the file list
         self._create_file_view()
         # Create the pending merges




More information about the bazaar-commits mailing list