Skip to content

Commit

Permalink
remove python2 check
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Oct 23, 2023
1 parent a865634 commit 350a304
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 350a304

Please sign in to comment.