summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradehad <26027314+adehad@users.noreply.github.com>2021-10-21 18:53:17 +0100
committeradehad <26027314+adehad@users.noreply.github.com>2021-10-21 18:53:17 +0100
commitbdba8b461e345255f6f5bd1654c9e813b1b913bf (patch)
tree2fc353a045177cbdd94e62ac167b36634b07fba0
parent11865abc65c7c096e8a415eda35b684140334ea7 (diff)
downloadtftpy-bdba8b461e345255f6f5bd1654c9e813b1b913bf.tar.gz
re-lint after merge
-rw-r--r--tftpy/TftpClient.py1
-rw-r--r--tftpy/TftpPacketFactory.py1
-rw-r--r--tftpy/TftpPacketTypes.py1
-rw-r--r--tftpy/TftpServer.py21
-rw-r--r--tftpy/TftpStates.py4
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