server/migractions.py
changeset 4204 60256056bda6
parent 4188 b3258d2afe04
parent 4195 86dcaf6bb92f
child 4252 6c4f109c2b03
equal deleted inserted replaced
4192:8e2eaa6b3733 4204:60256056bda6
   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)