From 7e7655efdae0157b3557f4951723f0788cea9a47 Mon Sep 17 00:00:00 2001 From: Zephyr Lykos Date: Tue, 9 Jan 2024 13:27:04 +0800 Subject: [PATCH] fix: remove Python 2 compat in qltui --- qltool | 5 ++++- qltui.py | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/qltool b/qltool index 18fb18018..b488e0901 100755 --- a/qltool +++ b/qltool @@ -186,7 +186,7 @@ def handle_examples(parser: argparse.ArgumentParser): parser.exit(0, __ql_examples) -if __name__ == '__main__': +def run(): parser = argparse.ArgumentParser() parser.add_argument('--version', action='version', version=f'qltool for Qiling {ql_ver}, using Unicorn {uc_ver}') @@ -319,3 +319,6 @@ if __name__ == '__main__': pprint(rep) exit(ql.os.exit_code) + +if __name__ == '__main__': + run() diff --git a/qltui.py b/qltui.py index 8e841881f..917e15083 100644 --- a/qltui.py +++ b/qltui.py @@ -2,7 +2,6 @@ import ast import pickle import re -import six import argparse import json @@ -131,13 +130,13 @@ def log(string, color): """ Function to beautify terminal output """ - six.print_(colored(string, color)) + print(colored(string, color)) else: def log(string, color): """ Function to beautify terminal output """ - six.print_(string) + print(string) class IntValidator(Validator):