Decode Network Manager states into strings
[platform/upstream/connman.git] / test / test-compat
1 #!/usr/bin/python
2
3 import dbus
4
5 bus = dbus.SystemBus()
6
7 manager = dbus.Interface(bus.get_object('org.freedesktop.NetworkManager',
8                                 '/org/freedesktop/NetworkManager'),
9                                         'org.freedesktop.NetworkManager')
10
11 states = [ "unknown", "asleep", "connecting", "connected", "disconnected" ]
12
13 state = manager.state()
14
15 print "System is %s" % (states[state])