amprolla

devuan's apt repo merger
git clone git://parazyd.org/amprolla.git
Log | Files | Refs | README | LICENSE

commit 385ad0a13cbf41188892e9880db84353a19657b6
parent 10017e02ee4fb54800e5b12a55477ff37f738735
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed, 31 May 2017 22:39:17 +0200

If merge_packages gets 0 or 1 package sets, don't fail

Diffstat:
Mlib/package.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/package.py b/lib/package.py @@ -99,9 +99,9 @@ def merge_packages_many(packages, banned_packages=set(), rewriter=None): packages dictionaries, priority is defined by the order of the `packages` list, optionally discarding any banned packages. """ - assert len(packages) > 1 # TODO: what to do when there is only one? - # a situation arises when the file exists, but it just has the gzip - # header, rather than any content + if not len(packages) > 1: + while not len(packages) > 1: + packages.append({'name': '', 'packages': {}}) new_pkgs = {}