summaryrefslogtreecommitdiff
path: root/tftpy/TftpClient.py
diff options
context:
space:
mode:
Diffstat (limited to 'tftpy/TftpClient.py')
-rw-r--r--tftpy/TftpClient.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tftpy/TftpClient.py b/tftpy/TftpClient.py
index 5fbe733..de565da 100644
--- a/tftpy/TftpClient.py
+++ b/tftpy/TftpClient.py
@@ -3,9 +3,9 @@ instance of the client, and then use its upload or download method. Logging is
performed via a standard logging object set in TftpShared."""
import time, types
-from TftpShared import *
-from TftpPacketFactory import *
-from TftpStates import TftpContextClientDownload, TftpContextClientUpload
+from .TftpShared import *
+from .TftpPacketFactory import *
+from .TftpStates import TftpContextClientDownload, TftpContextClientUpload
class TftpClient(TftpSession):
"""This class is an implementation of a tftp client. Once instantiated, a
@@ -21,11 +21,11 @@ class TftpClient(TftpSession):
self.options = options
# FIXME: If the blksize is DEF_BLKSIZE, we should just skip sending
# it.
- if self.options.has_key('blksize'):
+ if 'blksize' in self.options:
size = self.options['blksize']
- tftpassert(types.IntType == type(size), "blksize must be an int")
+ tftpassert(int == type(size), "blksize must be an int")
if size < MIN_BLKSIZE or size > MAX_BLKSIZE:
- raise TftpException, "Invalid blksize: %d" % size
+ raise TftpException("Invalid blksize: %d" % size)
else:
self.options['blksize'] = DEF_BLKSIZE