From: Niels Thykier Date: Thu, 11 Jun 2015 12:46:05 +0000 (+0200) Subject: rm: Only add component restriction if there is a component X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=dcb3f2496f145c8f606c62f1038f4c3708c86f7c;p=dak.git rm: Only add component restriction if there is a component Signed-off-by: Niels Thykier --- diff --git a/daklib/rm.py b/daklib/rm.py index ac966198..4019a818 100644 --- a/daklib/rm.py +++ b/daklib/rm.py @@ -380,7 +380,8 @@ def remove(session, reason, suites, removals, raise ValueError("component '%s' not recognised." % componentname) else: component_ids_list.append(component.component_id) - con_components = "AND component IN (%s)" % ", ".join([str(i) for i in component_ids_list]) + if component_ids_list: + con_components = "AND component IN (%s)" % ", ".join([str(i) for i in component_ids_list]) for i in removals: package = i[0]