From bdba8b461e345255f6f5bd1654c9e813b1b913bf Mon Sep 17 00:00:00 2001 From: adehad <26027314+adehad@users.noreply.github.com> Date: Thu, 21 Oct 2021 18:53:17 +0100 Subject: re-lint after merge --- tftpy/TftpClient.py | 1 - tftpy/TftpPacketFactory.py | 1 - tftpy/TftpPacketTypes.py | 1 - tftpy/TftpServer.py | 21 ++++++++++++--------- tftpy/TftpStates.py | 4 +++- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/tftpy/TftpClient.py b/tftpy/TftpClient.py index 3aac753..03522d1 100644 --- a/tftpy/TftpClient.py +++ b/tftpy/TftpClient.py @@ -15,7 +15,6 @@ from .TftpShared import * log = logging.getLogger("tftpy.TftpClient") - class TftpClient(TftpSession): """This class is an implementation of a tftp client. Once instantiated, a download can be initiated via the download() method, or an upload via the diff --git a/tftpy/TftpPacketFactory.py b/tftpy/TftpPacketFactory.py index 452033a..96baea4 100644 --- a/tftpy/TftpPacketFactory.py +++ b/tftpy/TftpPacketFactory.py @@ -13,7 +13,6 @@ from .TftpShared import * log = logging.getLogger("tftpy.TftpPacketFactory") - class TftpPacketFactory(object): """This class generates TftpPacket objects. It is responsible for parsing raw buffers off of the wire and returning objects representing them, via diff --git a/tftpy/TftpPacketTypes.py b/tftpy/TftpPacketTypes.py index f828534..9277786 100644 --- a/tftpy/TftpPacketTypes.py +++ b/tftpy/TftpPacketTypes.py @@ -13,7 +13,6 @@ from .TftpShared import * log = logging.getLogger("tftpy.TftpPacketTypes") - class TftpSession(object): """This class is the base class for the tftp client and server. Any shared code should be in this class.""" diff --git a/tftpy/TftpServer.py b/tftpy/TftpServer.py index ed1d491..754d84d 100644 --- a/tftpy/TftpServer.py +++ b/tftpy/TftpServer.py @@ -22,7 +22,6 @@ from .TftpShared import * log = logging.getLogger("tftpy.TftpServer") - class TftpServer(TftpSession): """This class implements a tftp server object. Run the listen() method to listen for client requests. @@ -165,14 +164,18 @@ class TftpServer(TftpSession): key = "%s:%s" % (raddress, rport) if key not in self.sessions: - log.debug("Creating new server context for session key = %s" % key) - self.sessions[key] = TftpContextServer(raddress, - rport, - timeout, - self.root, - self.dyn_file_func, - self.upload_open, - retries=retries) + log.debug( + "Creating new server context for session key = %s" % key + ) + self.sessions[key] = TftpContextServer( + raddress, + rport, + timeout, + self.root, + self.dyn_file_func, + self.upload_open, + retries=retries, + ) try: self.sessions[key].start(buffer) except TftpException as err: diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py index 5817d22..66cc1db 100644 --- a/tftpy/TftpStates.py +++ b/tftpy/TftpStates.py @@ -159,7 +159,9 @@ class TftpState(object): def resendLast(self): """Resend the last sent packet due to a timeout.""" - log.warning("Resending packet %s on sessions %s" % (self.context.last_pkt, self)) + log.warning( + "Resending packet %s on sessions %s" % (self.context.last_pkt, self) + ) self.context.metrics.resent_bytes += len(self.context.last_pkt.buffer) self.context.metrics.add_dup(self.context.last_pkt) sendto_port = self.context.tidport -- cgit v1.2.1