| 438 | |
| 439 | class SshAgentContext(logging.Handler): |
| 440 | def __init__(self): |
| 441 | super(SshAgentContext, self).__init__() |
| 442 | |
| 443 | self._thread = None # type: Optional[threading.Thread] |
| 444 | self.keys = [] # type: List[SshAgentKey] |
| 445 | self.path = None # type: Optional[str] |
| 446 | self._server = None # type: Optional[socket.socket] |
| 447 | self._lock_passphrase = None # type: Optional[bytes] |
| 448 | self._backend = default_backend() |
| 449 | self._logger = logging.getLogger('ssh-agent') |
| 450 | self._logger.propagate = False |
| 451 | self._logger.setLevel(logging.DEBUG) |
| 452 | self._logger.handlers.clear() |
| 453 | self._logger.addHandler(self) |
| 454 | self.log_messages = [] # type: List[logging.LogRecord] |
| 455 | |
| 456 | @property |
| 457 | def is_running(self): |