mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Handle non-zero status exception
This commit is contained in:
parent
83c005802b
commit
d39f4852d8
@ -48,9 +48,12 @@ def no_symlinks():
|
|||||||
output = ''
|
output = ''
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output('git config --get core.symlinks', shell=True)
|
output = subprocess.check_output('git config --get core.symlinks', shell=True)
|
||||||
except OSError as ex:
|
except OSError as exc:
|
||||||
if es.errno != errno.ENOENT:
|
if exc.errno != errno.ENOENT:
|
||||||
raise
|
raise
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
# git returned non-zero status
|
||||||
|
pass
|
||||||
HAS_SYMLINKS = False
|
HAS_SYMLINKS = False
|
||||||
if output.strip() == 'true':
|
if output.strip() == 'true':
|
||||||
HAS_SYMLINKS = True
|
HAS_SYMLINKS = True
|
||||||
|
Loading…
Reference in New Issue
Block a user