move save_cache into local

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2013-06-21 16:52:56 +02:00
commit 14a3bf7262
2 changed files with 10 additions and 3 deletions

View file

@ -160,6 +160,14 @@ class Local(object):
self._create_conf_path_and_link_conf_dirs()
self._link_types_for_emulator()
def save_cache(self):
destination = os.path.join(self.local.cache_path, self.target_host)
self.log.debug("Saving " + self.out_path + " to " + destination)
if os.path.exists(destination):
shutil.rmtree(destination)
shutil.move(self.out_path, destination)
def _create_context_dirs(self):
self.mkdir(self.out_path)