This code will definitely produce this error:
new_env = os.environ.copy()How to fix? Add explicit conversion to str():
new_env['MY_ENV'] = 1234
subprocess.Popen( ['/bin/echo'], env=new_env)
new_env = os.environ.copy()
new_env['MY_ENV'] = str(1234(
subprocess.Popen( ['/bin/echo'], env=new_env)
No comments :
Post a Comment
Note: only a member of this blog may post a comment.