summaryrefslogtreecommitdiff
path: root/cloudinit/subp.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/subp.py')
-rw-r--r--cloudinit/subp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/subp.py b/cloudinit/subp.py
index 804ef3ca..3e4efa42 100644
--- a/cloudinit/subp.py
+++ b/cloudinit/subp.py
@@ -262,7 +262,8 @@ def subp(args, data=None, rcs=None, env=None, capture=True,
raise ProcessExecutionError(
cmd=args, reason=e, errno=e.errno,
stdout="-" if decode else b"-",
- stderr="-" if decode else b"-")
+ stderr="-" if decode else b"-"
+ ) from e
finally:
if devnull_fp:
devnull_fp.close()