Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Fix env argument. Dicts are mutable and update returns None. #31

Merged
merged 1 commit into from May 9, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions envoy/core.py
Expand Up @@ -29,7 +29,8 @@ def __init__(self, cmd):

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():

Expand Down Expand Up @@ -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,
Expand Down