You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if file is not present it will populate env with None - this causes NPE in
org.python.core.Py.fileSystemDecode(Py.java:699)
and
at subprocess$py._setup_env$21(subprocess.py:827)
at subprocess$py.call_function(subprocess.py)
this is the code in subprocess.py:
ifjython:
def_setup_env(env, builder_env):
"""Carefully merge env with ProcessBuilder's only overwriting key/values that differ System.getenv (Map<String, String>) may be backed by <byte[], byte[]> on UNIX platforms where these are really bytes. ProcessBuilder's env inherits its contents and will maintain those byte values (which may be butchered as Strings) for the subprocess if they haven't been modified. """# Determine what's necessary to merge (new or different)merge_env=dict((key, value) forkey, valueinenv.iteritems()
ifkeynotinbuilder_envorbuilder_env.get(key) !=value)
# Prune anything not in enventries=builder_env.entrySet().iterator()
forentryinentries:
ifentry.getKey() notinenv:
entries.remove()
# add anything new or different in envforkey, valueinmerge_env.iteritems():
# If the new value is bytes, assume it to be FS-encodedbuilder_env.put(key, fileSystemDecode(value))
if file is not present it will populate env with None - this causes NPE in
and
this is the code in subprocess.py:
if value is None fileSystemDecode explodes:
Since os.environ is global and shared with all modules this should be prevented.
The text was updated successfully, but these errors were encountered: