Decode Network Manager states into strings
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Apr 2008 05:23:10 +0000 (07:23 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Apr 2008 05:23:10 +0000 (07:23 +0200)
test/test-compat

index b1149b9..cd1ca7a 100755 (executable)
@@ -8,6 +8,8 @@ manager = dbus.Interface(bus.get_object('org.freedesktop.NetworkManager',
                                '/org/freedesktop/NetworkManager'),
                                        'org.freedesktop.NetworkManager')
 
+states = [ "unknown", "asleep", "connecting", "connected", "disconnected" ]
+
 state = manager.state()
 
-print "System is %d" % (state)
+print "System is %s" % (states[state])