Unable to create backup or restore on Mac OS X

Resolves bug: 1505629

Change-Id: I5770b9c4cfb9473d57a4666c556e997549dd2d9a
This commit is contained in:
eldar nugaev 2015-10-13 12:20:34 +01:00
parent 4a9c785e0d
commit 9fbe4fe5c3
1 changed files with 4 additions and 7 deletions

View File

@ -367,8 +367,8 @@ def openssl_path():
def tar_path():
tar = (get_executable_path('tar') or get_executable_path('gtar') or
get_executable_path('gnutar'))
tar = (get_executable_path('gnutar') or get_executable_path('gtar')
or get_executable_path('tar'))
if not tar:
raise Exception('Please install gnu tar (gtar) as it is a '
'mandatory requirement to use freezer.')
@ -391,11 +391,8 @@ def get_executable_path(binary):
elif 'darwin' in sys.platform or 'bsd' in sys.platform:
binary_path = distspawn.find_executable(binary)
if binary_path is None:
binary_path = distspawn.find_executable(binary,
path=':'.join(sys.path))
return binary_path
return (distspawn.find_executable(binary) or
distspawn.find_executable(binary, path=':'.join(sys.path)))
else:
return distspawn.find_executable(binary)