From 4396124b8d45d2222a936b551e983d35f003577c Mon Sep 17 00:00:00 2001 From: "Michael P. Soulier" Date: Wed, 13 Oct 2010 18:46:29 -0400 Subject: [PATCH] Forcing decode mode to lower case, fixes bug 17. --- tftpy/TftpPacketTypes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tftpy/TftpPacketTypes.py b/tftpy/TftpPacketTypes.py index 700bff6..14cbd90 100644 --- a/tftpy/TftpPacketTypes.py +++ b/tftpy/TftpPacketTypes.py @@ -191,10 +191,10 @@ class TftpPacketInitial(TftpPacket, TftpPacketWithOptions): mystruct = struct.unpack(format, shortbuf) tftpassert(len(mystruct) == 2, "malformed packet") - log.debug("setting filename to %s" % mystruct[0]) - log.debug("setting mode to %s" % mystruct[1]) self.filename = mystruct[0] - self.mode = mystruct[1] + self.mode = mystruct[1].lower() # force lc - bug 17 + log.debug("set filename to %s" % self.filename) + log.debug("set mode to %s" % self.mode) self.options = self.decode_options(subbuf[tlength+1:]) return self