mirror of
https://github.com/not-kennethreitz/envoy.git
synced 2026-06-05 15:10:19 +00:00
Merge pull request #31 from bretthoerner/fix-env
Fix env argument. Dicts are mutable and update returns None.
This commit is contained in:
+4
-2
@@ -29,7 +29,8 @@ class Command(object):
|
||||
|
||||
def run(self, data, timeout, kill_timeout, env):
|
||||
self.data = data
|
||||
environ = dict(os.environ).update(env or {})
|
||||
environ = dict(os.environ)
|
||||
environ.update(env or {})
|
||||
|
||||
def target():
|
||||
|
||||
@@ -194,7 +195,8 @@ def connect(command, data=None, env=None):
|
||||
|
||||
# TODO: support piped commands
|
||||
command_str = expand_args(command).pop()
|
||||
environ = dict(os.environ).update(env or {})
|
||||
environ = dict(os.environ)
|
||||
environ.update(env or {})
|
||||
|
||||
process = subprocess.Popen(command_str,
|
||||
universal_newlines=True,
|
||||
|
||||
Reference in New Issue
Block a user