Handle non-zero status exception

This commit is contained in:
Daniel A. Wozniak 2018-03-28 14:32:04 -07:00
parent 83c005802b
commit d39f4852d8
No known key found for this signature in database
GPG Key ID: 166B9D2C06C82D61

View File

@ -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