Skip to content
Snippets Groups Projects
Commit b68c14ff authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Use Py3-compatible exec() calls

parent f2fbfc4b
No related branches found
No related tags found
No related merge requests found
......@@ -1288,9 +1288,9 @@ class CPyUserInterface(object):
import os
for arg in argv[1:]:
if os.access(arg, os.F_OK):
exec open(arg, "r") in execenv
exec(compile(open(arg, "r"), arg, 'exec'), execenv)
else:
exec arg in execenv
exec(compile(arg, "<command line>", 'exec'), execenv)
# check if the user set invalid keys
for added_key in (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment