remove useless if env:

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-02-09 19:12:49 +01:00
parent 1dcc420a38
commit 53c61d42ad

View file

@ -146,18 +146,17 @@ class Remote(object):
os_environ = os.environ.copy()
os_environ['__target_host'] = self.target_host
self.log.debug("Remote run script: %s", command)
# can't pass environment to remote side, so prepend command with
# variable declarations
if env:
self.log.debug("Remote run script env: %s", env)
command.extend(["%s=%s" % item for item in env.items()])
command.extend(["/bin/sh", "-e"])
command.append(script)
self.log.debug("Remote run script: %s", command)
if env:
self.log.debug("Remote run script env: %s", env)
try:
if return_output:
return subprocess.check_output(command, env=os_environ).decode()