116 with hooks_control(self.session, self.session.HOOKS_ALLOW_ALL, 'notification'): |
116 with hooks_control(self.session, self.session.HOOKS_ALLOW_ALL, 'notification'): |
117 super(ServerMigrationHelper, self).migrate(vcconf, toupgrade, options) |
117 super(ServerMigrationHelper, self).migrate(vcconf, toupgrade, options) |
118 |
118 |
119 def cmd_process_script(self, migrscript, funcname=None, *args, **kwargs): |
119 def cmd_process_script(self, migrscript, funcname=None, *args, **kwargs): |
120 try: |
120 try: |
121 super(ServerMigrationHelper, self).cmd_process_script( |
121 return super(ServerMigrationHelper, self).cmd_process_script( |
122 migrscript, funcname, *args, **kwargs) |
122 migrscript, funcname, *args, **kwargs) |
123 self.commit() |
|
124 except ExecutionError, err: |
123 except ExecutionError, err: |
125 print >> sys.stderr, "-> %s" % err |
124 print >> sys.stderr, "-> %s" % err |
126 except: |
125 except: |
127 self.rollback() |
126 self.rollback() |
128 raise |
127 raise |