/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to commit.py

  • Committer: Mateusz Korniak
  • Date: 2007-07-19 12:57:26 UTC
  • mto: This revision was merged to the branch mainline in revision 240.
  • Revision ID: matkor@laptop-hp-20070719125726-ifbdjbwepvioejel
Fix for broken dbus detection if network is avaiable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
                              '/org/freedesktop/NetworkManager')
154
154
                dbus_iface = dbus.Interface(
155
155
                        proxy_obj, 'org.freedesktop.NetworkManager')
156
 
                # 3 is the enum value for STATE_CONNECTED
157
 
                self._check_local.set_active(dbus_iface.state() != 3)
158
 
        
 
156
                try:
 
157
                    # 3 is the enum value for STATE_CONNECTED
 
158
                    self._check_local.set_active(dbus_iface.state() != 3) # FIXME: We need better way of finding if net is available, as above fails for me running KDE (MateuszKorniak).  
 
159
                                                                          # <dbus_bindings.DBusException instance at 0xb66e38cc> : The name org.freedesktop.NetworkManager was not provided by any .service files
 
160
                except Exception,e:
 
161
                    self._check_local.set_active(False) # Assuming commits non local seems sane to me  (MateuszKorniak).
 
162
                    print "ERROR: dbus_iface.state() failed with: %r : %s" % (e,e)
 
163
                
159
164
        # Create the file list
160
165
        self._create_file_view()
161
166
        # Create the pending merges