summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/config.py1
-rw-r--r--python/vyos/configsession.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/python/vyos/config.py b/python/vyos/config.py
index 6aed8693c..77698ac68 100644
--- a/python/vyos/config.py
+++ b/python/vyos/config.py
@@ -140,6 +140,7 @@ class Config(object):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
out = p.stdout.read()
p.wait()
+ p.communicate()
if p.returncode != 0:
raise VyOSError()
else:
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index ed6288939..163f666c2 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -121,6 +121,7 @@ class ConfigSession(object):
p = subprocess.Popen(cmd_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=self.__session_env)
result = p.wait()
output = p.stdout.read().decode()
+ p.communicate()
if result != 0:
raise ConfigSessionError(output)
return output