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 = ''
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