From 75c457faf7170abcd6abcef9f1ea8a750d25a033 Mon Sep 17 00:00:00 2001 From: m1ckk Date: Sun, 16 Jul 2023 13:28:08 +0200 Subject: [PATCH] Fix print() calls and exception handling to match with Python3 syntax. --- test.py | 9 ++++----- tools/run_03-SystemInfo.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test.py b/test.py index fc54dd07..668288c3 100755 --- a/test.py +++ b/test.py @@ -35,14 +35,13 @@ import warnings def test(title, fn): - title = "Testing %s... " % title - print title, + print(f"Testing {title}...") try: fn() - print "\tOK" + print("\tOK") return True - except Exception, e: - print "\tFAIL: %s" % str(e) + except Exception as e: + print(f"\tFAIL: {str(e)}") return False def test_module_load(): diff --git a/tools/run_03-SystemInfo.py b/tools/run_03-SystemInfo.py index 9e8d2118..08ab1e68 100644 --- a/tools/run_03-SystemInfo.py +++ b/tools/run_03-SystemInfo.py @@ -24,6 +24,6 @@ table.addRow("WinAppDbg", winappdbg.version) table.addRow("Process Count", system.get_process_count()) - print table.getOutput() + print(table.getOutput()) exit() \ No newline at end of file