]> git.decadent.org.uk Git - dak.git/commitdiff
rm: Only add component restriction if there is a component
authorNiels Thykier <niels@thykier.net>
Thu, 11 Jun 2015 12:46:05 +0000 (14:46 +0200)
committerNiels Thykier <niels@thykier.net>
Thu, 11 Jun 2015 12:46:22 +0000 (14:46 +0200)
Signed-off-by: Niels Thykier <niels@thykier.net>
daklib/rm.py

index ac966198deee4b2a553b71f34d24da6df060b43e..4019a8181164aec339eaea4c7a4239dbdf2d0112 100644 (file)
@@ -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]