[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug default/21566] fedabipkgdiff tool returns "max() arg is an empty sequence" error message in some cases
--- Comment #3 from dodji at seketeli dot org ---
Thanks for the patch!
I have some comments below.
> diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff
> index a8329d4..4ed017a 100755
> --- a/tools/fedabipkgdiff
> +++ b/tools/fedabipkgdiff
> @@ -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
> @@ -1111,7 +1111,9 @@ def diff_local_rpm_with_latest_rpm_from_koji():
> - result = run_abipkgdiff(rpm_col1, rpm_col2)
> + result = 0
> + if rpm_col1.rpms and rpm_col2.rpms:
> + result = run_abipkgdiff(rpm_col1, rpm_col2)
Why this change here? shouldn't run_abipkgdiff just return zero if
either rpm_col1 or rpm_col2 is empty, thanks to your previous diff hunk
If this change is not necessary, then I'd rather just drop it, as it
just clutters the code otherwise.
The same applies to the changes similar to this one in the patch.
You are receiving this mail because:
You are on the CC list for the bug.