diff options
| author | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
| commit | ee9c73a923909e23a649407be77e25235d769e25 (patch) | |
| tree | e21c923621fa278e737da693df9eb60ea31a6067 /examples/python/dbus/list-connections.py | |
| parent | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff) | |
New upstream version 1.10.8 upstream/1.10.8
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 90aec3b3..120b744a 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 as e: + except Exception, 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() |