docker.py: Improve subprocess exit code handling
commit0b95ff72cb42567dd71685bfdafbcdcd9784ea83
authorFam Zheng <famz@redhat.com>
Wed, 12 Jul 2017 07:55:28 +0000 (12 15:55 +0800)
committerFam Zheng <famz@redhat.com>
Mon, 17 Jul 2017 03:34:20 +0000 (17 11:34 +0800)
treea09e97e81d595039b0a434cbdcf0d37b79b62221
parent58bf7b6d8ccc469d8c001b8cf2b632d3f9e7fa38
docker.py: Improve subprocess exit code handling

A few error handlings are missing because we ignore the subprocess exit
code, for example "docker build" errors are currently ignored.

Introduce _do_check() aside the existing _do() method and use it in a
few places.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170712075528.22770-3-famz@redhat.com>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
tests/docker/docker.py