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 = ''
|
||||
try:
|
||||
output = subprocess.check_output('git config --get core.symlinks', shell=True)
|
||||
except OSError as ex:
|
||||
if es.errno != errno.ENOENT:
|
||||
except OSError as exc:
|
||||
if exc.errno != errno.ENOENT:
|
||||
raise
|
||||
except subprocess.CalledProcessError:
|
||||
# git returned non-zero status
|
||||
pass
|
||||
HAS_SYMLINKS = False
|
||||
if output.strip() == 'true':
|
||||
HAS_SYMLINKS = True
|
||||
|
Loading…
Reference in New Issue
Block a user