diff options
author | Michael P. Soulier <msoulier@digitaltorque.ca> | 2010-10-13 18:46:29 -0400 |
---|---|---|
committer | Michael P. Soulier <msoulier@digitaltorque.ca> | 2010-10-13 18:46:29 -0400 |
commit | 4396124b8d45d2222a936b551e983d35f003577c (patch) | |
tree | ee0e2ee2147ea6f8e86861136826ee5368c9c7c7 | |
parent | 45185ed44c53fefc9450a4e307eb66373f30b7a6 (diff) | |
download | tftpy-4396124b8d45d2222a936b551e983d35f003577c.tar.gz |
Forcing decode mode to lower case, fixes bug 17.
-rw-r--r-- | tftpy/TftpPacketTypes.py | 6 |
1 files 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 |