I had the previous working code in my script, and it was working well in python2.
exec("x = args.%s" % protocol)
the x
variable was then used after affectation. After the conversion to python3 with the 2to3 tool, this single line does not works anymore, with NameError: name 'x' is not defined
failure at runtime.
If I manually set in the script the right value for x, it works, proving the exec failed. I find it difficult to debug, can you help me?
replace the faulty line with hardcoded value proved it worked.