Permalink
Browse files

tklbam-restore bugfix: allow restoring of raw extract with uninitiali…

…zed TKLBAM and no profile

rational: allows restoring of extracts offline
  • Loading branch information...
1 parent 3c2ba2b commit 1f7f98ca631ba690179e4741c9fff1225b4c2f45 @lirazsiri lirazsiri committed Nov 6, 2013
Showing with 6 additions and 2 deletions.
  1. +4 −1 cmd_restore.py
  2. +2 −1 hooks.py
View
@@ -452,7 +452,10 @@ def get_backup_extract():
raw_download_path = TempDir(prefix="tklbam-")
os.chmod(raw_download_path, 0700)
- update_profile(conf.force_profile)
+ try:
+ update_profile(conf.force_profile)
+ except:
+ pass
if not (opt_simulate or opt_debug):
log_fh = file(opt_logfile, "a")
View
@@ -69,7 +69,8 @@ def __init__(self, name):
def _run(self, state):
_run_hooks(self.LOCAL_HOOKS, (self.name, state))
- _run_hooks(join(registry.profile, self.BASENAME), (self.name, state), keyring=self.PROFILE_KEYRING)
+ if registry.profile:
+ _run_hooks(join(registry.profile, self.BASENAME), (self.name, state), keyring=self.PROFILE_KEYRING)
def pre(self):
self._run("pre")

0 comments on commit 1f7f98c

Please sign in to comment.