equal
deleted
inserted
replaced
114 sqlexec(open(migrscript).read(), self.session.system_sql) |
114 sqlexec(open(migrscript).read(), self.session.system_sql) |
115 elif migrscript.endswith('.py') or migrscript.endswith('.txt'): |
115 elif migrscript.endswith('.py') or migrscript.endswith('.txt'): |
116 return super(ServerMigrationHelper, self).cmd_process_script( |
116 return super(ServerMigrationHelper, self).cmd_process_script( |
117 migrscript, funcname, *args, **kwargs) |
117 migrscript, funcname, *args, **kwargs) |
118 else: |
118 else: |
119 print |
119 print >> sys.stderr |
120 print ('-> ignoring %s, only .py .sql and .txt scripts are considered' % |
120 print >> sys.stderr, ('-> ignoring %s, only .py .sql and .txt scripts are considered' % |
121 migrscript) |
121 migrscript) |
122 print |
122 print >> sys.stderr |
123 self.commit() |
123 self.commit() |
124 except: |
124 except: |
125 self.rollback() |
125 self.rollback() |
126 raise |
126 raise |
127 |
127 |