diff options
| author | Michael Biebl <biebl@debian.org> | 2018-04-23 18:00:21 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-04-23 18:00:21 +0200 |
| commit | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (patch) | |
| tree | 2dd55c4ab0fdcbe9cddb26adb4a554b1a45c73c8 /examples/python/dbus/list-connections.py | |
| parent | 7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (diff) | |
New upstream version 1.11.3 upstream/1.11.3
Diffstat (limited to 'examples/python/dbus/list-connections.py')
| -rwxr-xr-x | examples/python/dbus/list-connections.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/python/dbus/list-connections.py b/examples/python/dbus/list-connections.py index 120b744a..90aec3b3 100755 --- a/examples/python/dbus/list-connections.py +++ b/examples/python/dbus/list-connections.py @@ -35,7 +35,7 @@ def merge_secrets(proxy, config, setting_name): for setting in secrets: for key in secrets[setting]: config[setting_name][key] = secrets[setting][key] - except Exception, e: + except Exception as e: pass def dict_to_string(d, indent): @@ -64,9 +64,9 @@ def dict_to_string(d, indent): def connection_to_string(config): # dump a connection configuration to a the console for setting_name in config: - print " Setting: %s" % setting_name - print dict_to_string(config[setting_name], " ") - print "" + print(" Setting: %s" % setting_name) + print(dict_to_string(config[setting_name], " ")) + print("") def print_connections(): @@ -95,13 +95,13 @@ def print_connections(): # Get the details of the 'connection' setting s_con = config['connection'] - print " name: %s" % s_con['id'] - print " uuid: %s" % s_con['uuid'] - print " type: %s" % s_con['type'] - print " ------------------------------------------" + print(" name: %s" % s_con['id']) + print(" uuid: %s" % s_con['uuid']) + print(" type: %s" % s_con['type']) + print(" ------------------------------------------") connection_to_string(config) - print "" + print("") print_connections() |