remove useless if env:
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
1dcc420a38
commit
53c61d42ad
1 changed files with 3 additions and 4 deletions
|
@ -146,18 +146,17 @@ class Remote(object):
|
||||||
os_environ = os.environ.copy()
|
os_environ = os.environ.copy()
|
||||||
os_environ['__target_host'] = self.target_host
|
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
|
# can't pass environment to remote side, so prepend command with
|
||||||
# variable declarations
|
# variable declarations
|
||||||
if env:
|
if env:
|
||||||
|
self.log.debug("Remote run script env: %s", env)
|
||||||
command.extend(["%s=%s" % item for item in env.items()])
|
command.extend(["%s=%s" % item for item in env.items()])
|
||||||
|
|
||||||
command.extend(["/bin/sh", "-e"])
|
command.extend(["/bin/sh", "-e"])
|
||||||
command.append(script)
|
command.append(script)
|
||||||
|
|
||||||
self.log.debug("Remote run script: %s", command)
|
|
||||||
if env:
|
|
||||||
self.log.debug("Remote run script env: %s", env)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if return_output:
|
if return_output:
|
||||||
return subprocess.check_output(command, env=os_environ).decode()
|
return subprocess.check_output(command, env=os_environ).decode()
|
||||||
|
|
Loading…
Reference in a new issue