summaryrefslogtreecommitdiff
path: root/examples/python
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-05-15 14:25:07 -0400
committerDan Winship <danw@gnome.org>2014-08-01 14:34:40 -0400
commit258e74eb0c191cdd86719ad65864ab3c27ada80c (patch)
tree29d5a0d72ca94d1ea7daaa6c19ef745db31806fd /examples/python
parent8ca2998d81ca7534c59262b10f5bf3c480177b88 (diff)
downloadNetworkManager-258e74eb0c191cdd86719ad65864ab3c27ada80c.tar.gz
libnm: make the the use of GInitable mandatory
Remove _nm_object_ensure_inited(), etc; objects that implement GInitable are now mandatory-to-init(). Remove constructor() implementations that sometimes return NULL; do all the relevant checking in init() instead. Make nm_client_new() and nm_remote_settings_new() take a GCancellable and a GError**.
Diffstat (limited to 'examples/python')
-rwxr-xr-xexamples/python/gi/device-state-ip4config.py2
-rwxr-xr-xexamples/python/gi/get-active-connections.py2
-rwxr-xr-xexamples/python/gi/get_ips.py2
-rwxr-xr-xexamples/python/gi/show-wifi-networks.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/examples/python/gi/device-state-ip4config.py b/examples/python/gi/device-state-ip4config.py
index faf0ef9422..1a6f7dece9 100755
--- a/examples/python/gi/device-state-ip4config.py
+++ b/examples/python/gi/device-state-ip4config.py
@@ -51,7 +51,7 @@ if __name__ == "__main__":
sys.exit('Usage: %s <interface>' % sys.argv[0])
dev_iface = sys.argv[1]
- c = NM.Client.new()
+ c = NM.Client.new(None)
dev = c.get_device_by_iface(dev_iface)
if dev is None:
sys.exit('Device \'%s\' not found' % dev_iface)
diff --git a/examples/python/gi/get-active-connections.py b/examples/python/gi/get-active-connections.py
index a295be3038..55ba2d81cd 100755
--- a/examples/python/gi/get-active-connections.py
+++ b/examples/python/gi/get-active-connections.py
@@ -24,7 +24,7 @@
from gi.repository import GLib, NM
if __name__ == "__main__":
- client = NM.Client.new()
+ client = NM.Client.new(None)
acons = client.get_active_connections()
for ac in acons:
print "%s (%s) - %s" % (ac.get_id(), ac.get_uuid(), ac.get_connection_type())
diff --git a/examples/python/gi/get_ips.py b/examples/python/gi/get_ips.py
index 9f1853f17e..1d110bfd41 100755
--- a/examples/python/gi/get_ips.py
+++ b/examples/python/gi/get_ips.py
@@ -124,7 +124,7 @@ if __name__ == "__main__":
sys.exit('Usage: %s <interface>' % sys.argv[0])
dev_iface = sys.argv[1]
- c = NM.Client.new()
+ c = NM.Client.new(None)
dev = c.get_device_by_iface(dev_iface)
if dev is None:
sys.exit('Device \'%s\' not found' % dev_iface)
diff --git a/examples/python/gi/show-wifi-networks.py b/examples/python/gi/show-wifi-networks.py
index 8f61cfcbe8..c76d1c4cb9 100755
--- a/examples/python/gi/show-wifi-networks.py
+++ b/examples/python/gi/show-wifi-networks.py
@@ -62,7 +62,7 @@ def print_ap_info(ap):
print
if __name__ == "__main__":
- nmc = NM.Client.new()
+ nmc = NM.Client.new(None)
devs = nmc.get_devices()
for dev in devs: