summaryrefslogtreecommitdiff
path: root/test/test-compat
blob: cd1ca7a79dcc4c88c16db274464fa37bb83f59cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python

import dbus

bus = dbus.SystemBus()

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 %s" % (states[state])