# HG changeset patch # User Sylvain Thénault # Date 1264444564 -3600 # Node ID 066e7884e57d6a8fc93c0d3a8b98f148528cd4f3 # Parent 69bff38ebe91f21e60f7b9afe4ea6c87c33ecf2e add source in backup/restore failure message diff -r 69bff38ebe91 -r 066e7884e57d server/migractions.py --- a/server/migractions.py Mon Jan 25 19:28:09 2010 +0100 +++ b/server/migractions.py Mon Jan 25 19:36:04 2010 +0100 @@ -148,7 +148,7 @@ try: source.backup(osp.join(tmpdir, source.uri)) except Exception, exc: - print '-> error trying to backup [%s]' % exc + print '-> error trying to backup %s [%s]' % (source.uri, exc) if not self.confirm('Continue anyway?', default='n'): raise SystemExit(1) else: @@ -180,7 +180,7 @@ bkup = tarfile.open(backupfile, 'r|gz') except tarfile.ReadError: # assume restoring old backup - shutil.copy(backupfile, osp.join(tmpdir, 'system')) + shutil.copy(backupfile, osp.join(tmpdir, 'system')) else: for name in bkup.getnames(): if name[0] in '/.': @@ -198,7 +198,7 @@ try: source.restore(osp.join(tmpdir, source.uri), self.confirm, drop) except Exception, exc: - print '-> error trying to restore [%s]' % exc + print '-> error trying to restore %s [%s]' % (source.uri, exc) if not self.confirm('Continue anyway?', default='n'): raise SystemExit(1) shutil.rmtree(tmpdir)