[migration] avoid AssertionError / crashes if migration script is neither a py nor a sql file
--- a/server/migractions.py Tue Nov 17 11:48:36 2009 +0100
+++ b/server/migractions.py Wed Nov 18 10:05:41 2009 +0100
@@ -104,9 +104,14 @@
if migrscript.endswith('.sql'):
if self.execscript_confirm(migrscript):
sqlexec(open(migrscript).read(), self.session.system_sql)
- else:
+ elif migrscript.endswith('.py'):
return super(ServerMigrationHelper, self).cmd_process_script(
migrscript, funcname, *args, **kwargs)
+ else:
+ print
+ print ('-> ignoring %s, only .py and .sql scripts are considered' %
+ migrscript)
+ print
self.commit()
except:
self.rollback()