diff --git a/tftpy/TftpContexts.py b/tftpy/TftpContexts.py index c3a1bd4..78bf34e 100644 --- a/tftpy/TftpContexts.py +++ b/tftpy/TftpContexts.py @@ -67,7 +67,7 @@ class TftpMetrics(object): class TftpContext(object): """The base class of the contexts.""" - def __init__(self, host, port, timeout, dyn_file_func=None): + def __init__(self, host, port, timeout): """Constructor for the base context, setting shared instance variables.""" self.file_to_transfer = None @@ -94,7 +94,6 @@ class TftpContext(object): self.last_update = 0 # The last packet we sent, if applicable, to make resending easy. self.last_pkt = None - self.dyn_file_func = dyn_file_func # Count the number of retry attempts. self.retry_count = 0 @@ -199,11 +198,11 @@ class TftpContextServer(TftpContext): host, port, timeout, - dyn_file_func ) # At this point we have no idea if this is a download or an upload. We # need to let the start state determine that. self.state = TftpStateServerStart(self) + self.root = root self.dyn_file_func = dyn_file_func