diff options
author | Daniel Wagner <wagi@monom.org> | 2020-02-10 09:07:34 +0100 |
---|---|---|
committer | Daniel Wagner <wagi@monom.org> | 2020-02-10 09:12:58 +0100 |
commit | 55965561d3b6acb40777116869276c6e74563c42 (patch) | |
tree | e8b3593e1d92563c1d2e11ee8eb00e0368d0dd14 /test/get-services | |
parent | 575190f39709a19bd913d44584b4bdcd34b3b593 (diff) | |
download | connman-55965561d3b6acb40777116869276c6e74563c42.tar.gz |
test: Update all Python script to version 3
Python2 is EOL, it's time to update our test script to run with
Python3. The conversion was done using 2to3 and most of the scripts
will run with both versions. Since most of the transformation is about
updating the print commands. Only a quick smoke test was done.
Diffstat (limited to 'test/get-services')
-rwxr-xr-x | test/get-services | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/get-services b/test/get-services index 09564804..2fa8b5b7 100755 --- a/test/get-services +++ b/test/get-services @@ -4,7 +4,7 @@ import dbus def extract_values(values): val = "{" - for key in values.keys(): + for key in list(values.keys()): val += " " + key + "=" if key in ["Servers", "Excludes"]: val += extract_list(values[key]) @@ -31,9 +31,9 @@ for entry in services: path = entry[0] properties = entry[1] - print "[ %s ]" % (path) + print("[ %s ]" % (path)) - for key in properties.keys(): + for key in list(properties.keys()): if key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", "Proxy", "Proxy.Configuration", @@ -53,6 +53,6 @@ for entry in services: val = int(properties[key]) else: val = str(properties[key]) - print " %s = %s" % (key, val) + print(" %s = %s" % (key, val)) - print + print() |