summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael P. Soulier <msoulier@digitaltorque.ca>2010-02-18 10:03:21 -0500
committerMichael P. Soulier <msoulier@digitaltorque.ca>2010-02-18 10:03:21 -0500
commit8343ccf5c3191983631884da0ff86673499e2230 (patch)
treee2eb16107d2dc35828f5c6bca9c07fce99dfdfea
parentbadf18f2a4ffd7fa31f73767a8898bfc809b7e5e (diff)
downloadtftpy-8343ccf5c3191983631884da0ff86673499e2230.tar.gz
Taking patch from "Mike C. Fletcher" <mcfletch@vrplumber.com>, fixing a bad
reference to dyn_func_file from a state object.
-rw-r--r--tftpy/TftpStates.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py
index fc36a9b..2d6736e 100644
--- a/tftpy/TftpStates.py
+++ b/tftpy/TftpStates.py
@@ -549,12 +549,12 @@ class TftpStateServerRecvRRQ(TftpState):
# Note: Open in binary mode for win32 portability, since win32
# blows.
self.context.fileobj = open(path, "rb")
- elif self.dyn_file_func:
+ elif self.context.dyn_file_func:
log.debug("No such file %s but using dyn_file_func" % path)
self.context.fileobj = \
- self.dyn_file_func(self.context.file_to_transfer)
+ self.context.dyn_file_func(self.context.file_to_transfer)
else:
- send.sendError(TftpErrors.FileNotFound)
+ self.sendError(TftpErrors.FileNotFound)
raise TftpException, "File not found: %s" % path
# Options negotiation.