Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when running bessctl, an SyntaxError raised #13

Closed
xnhp0320 opened this issue Dec 21, 2015 · 3 comments
Closed

when running bessctl, an SyntaxError raised #13

xnhp0320 opened this issue Dec 21, 2015 · 3 comments

Comments

@xnhp0320
Copy link

Traceback (most recent call last):
File "./bessctl", line 9, in
import commands
File "/home/hepeng/bess/bessctl/commands.py", line 507
exec(code in new_globals, locals())
SyntaxError: unqualified exec is not allowed in function '_do_run_file' it contains a nested function with free variables

@ghost
Copy link

ghost commented Dec 21, 2015

-        exec(code, new_globals)
+        exec code in new_globals

@xnhp0320
Copy link
Author

Thanks.

@sangjinhan
Copy link
Member

Fixed the issue by not using the nested function. For compatibility with Python 3, I'll keep the exec as a function call (not a statement) for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants