[server/migractions] raising SystemExit sounds like a bad idea
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 25 Aug 2015 11:09:22 +0200
changeset 10571 2cd8933fd875
parent 10562 0c492a2720f1
child 10572 2d5f7780b568
[server/migractions] raising SystemExit sounds like a bad idea Simply skip the action (rename_relation_type) with an early return.
server/migractions.py
--- a/server/migractions.py	Fri Jul 31 15:17:43 2015 +0200
+++ b/server/migractions.py	Tue Aug 25 11:09:22 2015 +0200
@@ -1080,7 +1080,7 @@
             if not self.confirm('Relation %s is still present in the filesystem schema,'
                                 ' do you really want to drop it?' % oldname,
                                 default='n'):
-                raise SystemExit(1)
+                return
         self.cmd_add_relation_type(newname, commit=True)
         self.rqlexec('SET X %s Y WHERE X %s Y' % (newname, oldname),
                      ask_confirm=self.verbosity>=2)