server/migractions.py
branchstable
changeset 4195 86dcaf6bb92f
parent 3935 2fbb79054a1a
child 4204 60256056bda6
child 4212 ab6573088b4a
equal deleted inserted replaced
4194:7d5d469f81e1 4195:86dcaf6bb92f
   194         repo = self.repo_connect()
   194         repo = self.repo_connect()
   195         for source in repo.sources:
   195         for source in repo.sources:
   196             if systemonly and source.uri != 'system':
   196             if systemonly and source.uri != 'system':
   197                 continue
   197                 continue
   198             try:
   198             try:
   199                 source.restore(osp.join(tmpdir, source.uri), drop=drop)
   199                 source.restore(osp.join(tmpdir, source.uri), self.confirm, drop)
   200             except Exception, exc:
   200             except Exception, exc:
   201                 print '-> error trying to restore [%s]' % exc
   201                 print '-> error trying to restore [%s]' % exc
   202                 if not self.confirm('Continue anyway?', default='n'):
   202                 if not self.confirm('Continue anyway?', default='n'):
   203                     raise SystemExit(1)
   203                     raise SystemExit(1)
   204         shutil.rmtree(tmpdir)
   204         shutil.rmtree(tmpdir)