From dcb3f2496f145c8f606c62f1038f4c3708c86f7c Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Thu, 11 Jun 2015 14:46:05 +0200 Subject: [PATCH] rm: Only add component restriction if there is a component Signed-off-by: Niels Thykier --- daklib/rm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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] -- 2.39.5