Fail on non-existing path to backup
Change-Id: I897444a8eba24b61fcab4a694ad73b6688e31fb8 Closes-Bug: #1553146
This commit is contained in:
parent
d5cf47c4eb
commit
1c9bba42ac
|
@ -142,7 +142,11 @@ class BackupJob(Job):
|
|||
filepath = '.'
|
||||
chdir_path = os.path.expanduser(
|
||||
os.path.normpath(self.conf.path_to_backup.strip()))
|
||||
|
||||
if not os.path.exists(chdir_path):
|
||||
msg = 'Path to backup does not exist {}'.format(
|
||||
chdir_path)
|
||||
LOG.critical(msg)
|
||||
raise IOError(msg)
|
||||
if not os.path.isdir(chdir_path):
|
||||
filepath = os.path.basename(chdir_path)
|
||||
chdir_path = os.path.dirname(chdir_path)
|
||||
|
|
Loading…
Reference in New Issue