Check if return_codes list is empty in fedabipkgdiff

In fedabipkgdiff tool, some packages might have only
noarch sub-packages. In these cases, no package is
available for running abipkgdiff. This leads to
return_codes list being empty.

	* tools/fedabipkgdiff (run_abipkgdiff()): Check if
	return_codes list is empty

Signed-off-by: Sinny Kumari <sinny@redhat.com>
This commit is contained in:
Sinny Kumari 2017-06-14 02:39:02 +05:30
parent d1095a8b1e
commit 8f0f82c511

View File

@ -1075,7 +1075,7 @@ def run_abipkgdiff(rpm_col1, rpm_col2):
return_codes = [
abipkgdiff(cmp_half1, cmp_half2) for cmp_half1, cmp_half2
in generate_comparison_halves(rpm_col1, rpm_col2)]
return max(return_codes)
return max(return_codes) if return_codes else 0
@log_call