]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote-tracking branch 'nthykier/auto-decruft'
authorJoerg Jaspert <joerg@debian.org>
Thu, 11 Jun 2015 12:47:55 +0000 (14:47 +0200)
committerJoerg Jaspert <joerg@debian.org>
Thu, 11 Jun 2015 12:47:55 +0000 (14:47 +0200)
* nthykier/auto-decruft:
  rm: Only add component restriction if there is a component

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]