mirror of
https://github.com/borgbase/vorta
synced 2024-12-23 08:17:08 +00:00
Handle OSError 6 when trying to read a socket in .ssh (#269)
Fixes #268
This commit is contained in:
parent
a83ad6352e
commit
33c16d925f
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue