diff options
| author | Mark Goddard <mgoddard@cray.com> | 2016-05-31 12:01:06 -0500 |
|---|---|---|
| committer | Mark Goddard <mgoddard@cray.com> | 2016-05-31 12:19:17 -0500 |
| commit | b3e8ac8371a497aed6270358062cdfe4952a37ae (patch) | |
| tree | a4718f11304d679ba858e8c882f131b659a08ab0 /kolla/cmd | |
| parent | 4ad1af1328b9e558b2e596d518a99b7a4c8efee9 (diff) | |
| download | kolla-b3e8ac8371a497aed6270358062cdfe4952a37ae.tar.gz kolla-b3e8ac8371a497aed6270358062cdfe4952a37ae.zip | |
Don't always unpack image build results tuple, as it may be None
Change-Id: I21b1327da1de1bd3cc3018ba37715b0a19c1dbef
Closes-Bug: #1587501
Diffstat (limited to 'kolla/cmd')
| -rwxr-xr-x | kolla/cmd/build.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index 18ff68503..779ac7697 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -738,6 +738,11 @@ class KollaWorker(object): def run_build(): + """Build container images. + + :return: A 3-tuple containing bad, good, and unmatched container image + status dicts, or None if no images were built. + """ conf = cfg.ConfigOpts() common_config.parse(conf, sys.argv[1:], prog='kolla-build') @@ -792,11 +797,12 @@ def run_build(): def main(): - bad_results, good_results, unmatched_results = run_build() - if len(bad_results): - return 1 - else: - return 0 + statuses = run_build() + if statuses: + bad_results, good_results, unmatched_results = statuses + if bad_results: + return 1 + return 0 if __name__ == '__main__': |
