From 2bdc5c9d7aa067abe0ca884d411fa30ca80fc952 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 29 Oct 2014 20:35:21 +0100 Subject: [PATCH] Updated gamecontroller database sorting script to work with Python 3. --- src/joystick/sort_controllers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/joystick/sort_controllers.py b/src/joystick/sort_controllers.py index 03b857a022d5e..865127a1b47fc 100755 --- a/src/joystick/sort_controllers.py +++ b/src/joystick/sort_controllers.py @@ -30,9 +30,9 @@ def write_controllers(): for entry in sorted(controllers, key=lambda entry: entry[2]): line = "".join(entry) + "\n" if not line.endswith(",\n") and not line.endswith("*/\n"): - print "Warning: '%s' is missing a comma at the end of the line" % (line) + print("Warning: '%s' is missing a comma at the end of the line" % (line)) if (entry[1] in controller_guids): - print "Warning: entry '%s' is duplicate of entry '%s'" % (entry[2], controller_guids[entry[1]][2]) + print("Warning: entry '%s' is duplicate of entry '%s'" % (entry[2], controller_guids[entry[1]][2])) controller_guids[entry[1]] = entry output.write(line) @@ -48,7 +48,7 @@ def write_controllers(): write_controllers() output.write(line) elif (line.startswith("#")): - print "Parsing " + line.strip() + print("Parsing " + line.strip()) write_controllers() output.write(line) else: @@ -60,4 +60,4 @@ def write_controllers(): output.write(line) output.close() -print "Finished writing %s.new" % filename +print("Finished writing %s.new" % filename)