mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
ssh: handle FileNotFoundError errors
If ssh isn't installed, it throws a distinct error we have to catch. Bug: https://crbug.com/gerrit/15196 Change-Id: I0660e842c304ce7575f5cb100894d05fd65f9454 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/322055 Reviewed-by: Jack Neus <jackneus@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
03ff276cd7
commit
282d0cae89
3
ssh.py
3
ssh.py
@ -52,6 +52,9 @@ def version():
|
||||
"""return ssh version as a tuple"""
|
||||
try:
|
||||
return _parse_ssh_version()
|
||||
except FileNotFoundError:
|
||||
print('fatal: ssh not installed', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
except subprocess.CalledProcessError:
|
||||
print('fatal: unable to detect ssh version', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user