summaryrefslogtreecommitdiff
path: root/tester/rt/tftpy/TftpClient.py
diff options
context:
space:
mode:
Diffstat (limited to 'tester/rt/tftpy/TftpClient.py')
-rw-r--r--tester/rt/tftpy/TftpClient.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tester/rt/tftpy/TftpClient.py b/tester/rt/tftpy/TftpClient.py
index 2763dda..eb82c05 100644
--- a/tester/rt/tftpy/TftpClient.py
+++ b/tester/rt/tftpy/TftpClient.py
@@ -1,13 +1,18 @@
+# vim: ts=4 sw=4 et ai:
+# -*- coding: utf8 -*-
"""This module implements the TFTP Client functionality. Instantiate an
instance of the client, and then use its upload or download method. Logging is
performed via a standard logging object set in TftpShared."""
-from __future__ import absolute_import, division, print_function, unicode_literals
+
import types
+import logging
from .TftpShared import *
from .TftpPacketTypes import *
from .TftpContexts import TftpContextClientDownload, TftpContextClientUpload
+log = logging.getLogger('tftpy.TftpClient')
+
class TftpClient(TftpSession):
"""This class is an implementation of a tftp client. Once instantiated, a
download can be initiated via the download() method, or an upload via the
@@ -23,7 +28,7 @@ class TftpClient(TftpSession):
self.localip = localip
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)