# HG changeset patch # User Julien Jehannet # Date 1280498488 -7200 # Node ID a11c1e3c16c3857e8817eea14c9cfdf831c8580a # Parent 711e7e8c69e3a6950e1e2e7a4ba86d9059a7ff13 [c-c shell/upgrade] raise ExecutionError when traceback is not relevant diff -r 711e7e8c69e3 -r a11c1e3c16c3 server/migractions.py --- 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():