diff options
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 5058e1d4..bdc1fce2 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -141,10 +141,8 @@ def runparts(dirp, skip_no_exist=True): return def subp(args, input=None): - s_in = None - if input is not None: - s_in = subprocess.PIPE - sp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=s_in) + sp = subprocess.Popen(args, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, stdin=subprocess.PIPE) out,err = sp.communicate(input) if sp.returncode is not 0: raise subprocess.CalledProcessError(sp.returncode,args, (out,err)) |