equal
deleted
inserted
replaced
368 |
368 |
369 takes as argument value stored in db_cache by self._backup_database""" |
369 takes as argument value stored in db_cache by self._backup_database""" |
370 # XXX set a clearer error message ??? |
370 # XXX set a clearer error message ??? |
371 backup_coordinates, config_path = self.db_cache[self.db_cache_key(db_id)] |
371 backup_coordinates, config_path = self.db_cache[self.db_cache_key(db_id)] |
372 # reload the config used to create the database. |
372 # reload the config used to create the database. |
373 config = pickle.loads(open(config_path, 'rb').read()) |
373 with open(config_path, 'rb') as f: |
|
374 config = pickle.load(f) |
374 # shutdown repo before changing database content |
375 # shutdown repo before changing database content |
375 if self._repo is not None: |
376 if self._repo is not None: |
376 self._repo.turn_repo_off() |
377 self._repo.turn_repo_off() |
377 self._restore_database(backup_coordinates, config) |
378 self._restore_database(backup_coordinates, config) |
378 |
379 |