[migration] make remove_cube('foo') not fail if foo is already removed. Closes #2106532 stable
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 05 Dec 2011 14:31:41 +0100
branchstable
changeset 8107 e5858a4a1244
parent 8106 241123f7bcd0
child 8108 91868ec92391
[migration] make remove_cube('foo') not fail if foo is already removed. Closes #2106532
migration.py
--- a/migration.py	Mon Dec 05 13:42:23 2011 +0100
+++ b/migration.py	Mon Dec 05 14:31:41 2011 +0100
@@ -411,7 +411,7 @@
         basecubes = [c for c in origcubes if not c in toremove]
         self.config._cubes = tuple(self.config.expand_cubes(basecubes))
         removed = [p for p in origcubes if not p in self.config._cubes]
-        if not cube in removed:
+        if not cube in removed and cube in origcubes:
             raise ConfigurationError("can't remove cube %s, "
                                      "used as a dependency" % cube)
         return removed