From 350a304c5e8d026a9466cda820c048b82973f7ae Mon Sep 17 00:00:00 2001 From: Thomas VINCENT Date: Mon, 23 Oct 2023 11:46:53 +0200 Subject: [PATCH] remove python2 check --- bootstrap.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index 75f475802a..2d961be148 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -58,17 +58,15 @@ def _get_available_scripts(path): return res -if sys.version_info[0] >= 3: # Python3 - - def execfile(fullpath, globals=None, locals=None): - "Python3 implementation for execfile" - with open(fullpath) as f: - try: - data = f.read() - except UnicodeDecodeError: - raise SyntaxError("Not a Python script") - code = compile(data, fullpath, 'exec') - exec(code, globals, locals) +def execfile(fullpath, globals=None, locals=None): + "Python3 implementation for execfile" + with open(fullpath) as f: + try: + data = f.read() + except UnicodeDecodeError: + raise SyntaxError("Not a Python script") + code = compile(data, fullpath, 'exec') + exec(code, globals, locals) def run_file(filename, argv):