summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_gce.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-01-23 18:08:14 -0700
committerChad Smith <chad.smith@canonical.com>2018-01-23 18:08:14 -0700
commit183d5785954af3a1e7603798d4a91ab126eb7bb9 (patch)
treec9ef1b49b37f15bc140ab822884b2c901d9253bc /tests/unittests/test_datasource/test_gce.py
parentc02a4d4c88cc2c6ec9f03ddf86703f5b67e04348 (diff)
downloadvyos-cloud-init-183d5785954af3a1e7603798d4a91ab126eb7bb9.tar.gz
vyos-cloud-init-183d5785954af3a1e7603798d4a91ab126eb7bb9.zip
subp: make ProcessExecutionError have expected types in stderr, stdout.
When subp raised a ProcessExecutionError, that exception's stderr and stdout might end up being the string '-' rather than bytes. This mean that:    try:        subp(mycommand, decode=False)    except ProcessExecutionError as e:        pass Would have 'e.stdout' set to '-' while the caller would expect bytes. Also reduce the try/except block in subp to a specifically the two lines that may raise an OSError.
Diffstat (limited to 'tests/unittests/test_datasource/test_gce.py')
0 files changed, 0 insertions, 0 deletions