--- a/server/migractions.py Thu Sep 23 15:30:54 2010 +0200
+++ b/server/migractions.py Fri Jul 30 16:01:28 2010 +0200
@@ -205,7 +205,7 @@
askconfirm=True):
# check
if not osp.exists(backupfile):
- raise Exception("Backup file %s doesn't exist" % backupfile)
+ raise ExecutionError("Backup file %s doesn't exist" % backupfile)
if askconfirm and not self.confirm('Restore %s database from %s ?'
% (self.config.appid, backupfile)):
return
@@ -219,7 +219,7 @@
else:
for name in bkup.getnames():
if name[0] in '/.':
- raise Exception('Security check failed, path starts with "/" or "."')
+ raise ExecutionError('Security check failed, path starts with "/" or "."')
bkup.close() # XXX seek error if not close+open !?!
bkup = tarfile.open(backupfile, 'r|gz')
bkup.extractall(path=tmpdir)
@@ -791,8 +791,8 @@
try:
specialized.eid = instschema[specialized].eid
except KeyError:
- raise Exception('trying to add entity type but parent type is '
- 'not yet in the database schema')
+ raise ExecutionError('trying to add entity type but parent type is '
+ 'not yet in the database schema')
self.rqlexecall(ss.eschemaspecialize2rql(eschema), ask_confirm=confirm)
# register entity's attributes
for rschema, attrschema in eschema.attribute_definitions():