blob: cd1ca7a79dcc4c88c16db274464fa37bb83f59cb [file] [log] [blame]
#!/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])