1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-23 00:07:58 +00:00

Handle OSError 6 when trying to read a socket in .ssh (#269)

Fixes #268
This commit is contained in:
Serge van Ginderachter 2019-04-25 06:32:43 +02:00 committed by Manuel Riel
parent a83ad6352e
commit 33c16d925f

View file

@ -1,4 +1,5 @@
import os
import errno
import sys
import platform
import plistlib
@ -78,6 +79,12 @@ def get_private_keys():
available_private_keys.append(key_details)
except (SSHException, UnicodeDecodeError, IsADirectoryError):
continue
except OSError as e:
if e.errno == errno.ENXIO:
# when key_file is a (ControlPath) socket
continue
else:
raise
return available_private_keys