diff options
Diffstat (limited to 'tftpy/TftpPacketFactory.py')
-rw-r--r-- | tftpy/TftpPacketFactory.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tftpy/TftpPacketFactory.py b/tftpy/TftpPacketFactory.py index d689185..b47bcd3 100644 --- a/tftpy/TftpPacketFactory.py +++ b/tftpy/TftpPacketFactory.py @@ -2,8 +2,8 @@ buffer, and return the appropriate TftpPacket object to represent it, via the parse() method.""" -from TftpShared import * -from TftpPacketTypes import * +from .TftpShared import * +from .TftpPacketTypes import * class TftpPacketFactory(object): """This class generates TftpPacket objects. It is responsible for parsing @@ -33,7 +33,7 @@ class TftpPacketFactory(object): def __create(self, opcode): """This method returns the appropriate class object corresponding to the passed opcode.""" - tftpassert(self.classes.has_key(opcode), + tftpassert(opcode in self.classes, "Unsupported opcode: %d" % opcode) packet = self.classes[opcode]() |