diff options
author | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:16:14 +0300 |
---|---|---|
committer | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:43:30 +0300 |
commit | b8cf9e88f4c5c64d9406af533d8948deb050d695 (patch) | |
tree | 218eb61fb3c3b96ec08b4d8cdfef383104a87d63 /contrib/python/Twisted/py3/twisted/conch/ssh/address.py | |
parent | 523f645a83a0ec97a0332dbc3863bb354c92a328 (diff) | |
download | ydb-b8cf9e88f4c5c64d9406af533d8948deb050d695.tar.gz |
add kikimr_configure
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/conch/ssh/address.py')
-rw-r--r-- | contrib/python/Twisted/py3/twisted/conch/ssh/address.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/python/Twisted/py3/twisted/conch/ssh/address.py b/contrib/python/Twisted/py3/twisted/conch/ssh/address.py new file mode 100644 index 0000000000..88ce0d1c7f --- /dev/null +++ b/contrib/python/Twisted/py3/twisted/conch/ssh/address.py @@ -0,0 +1,43 @@ +# -*- test-case-name: twisted.conch.test.test_address -*- +# Copyright (c) Twisted Matrix Laboratories. +# See LICENSE for details. + +""" +Address object for SSH network connections. + +Maintainer: Paul Swartz + +@since: 12.1 +""" + + +from zope.interface import implementer + +from twisted.internet.interfaces import IAddress +from twisted.python import util + + +@implementer(IAddress) +class SSHTransportAddress(util.FancyEqMixin): + """ + Object representing an SSH Transport endpoint. + + This is used to ensure that any code inspecting this address and + attempting to construct a similar connection based upon it is not + mislead into creating a transport which is not similar to the one it is + indicating. + + @ivar address: An instance of an object which implements I{IAddress} to + which this transport address is connected. + """ + + compareAttributes = ("address",) + + def __init__(self, address): + self.address = address + + def __repr__(self) -> str: + return f"SSHTransportAddress({self.address!r})" + + def __hash__(self): + return hash(("SSH", self.address)) |