summaryrefslogtreecommitdiff
path: root/tftpy/TftpClient.py
diff options
context:
space:
mode:
authorMichael P. Soulier <msoulier@digitaltorque.ca>2009-08-15 22:36:58 -0400
committerMichael P. Soulier <msoulier@digitaltorque.ca>2009-08-16 19:56:06 -0400
commit62b22fb562eff64a6d6bb6c1a1a3c194d668d9a1 (patch)
tree8adf96a5c71b15cfa443c974ee3ad6e270c8b9e4 /tftpy/TftpClient.py
parent03e4e748293070ac37fb7fe88abc8b915d84be96 (diff)
downloadtftpy-62b22fb562eff64a6d6bb6c1a1a3c194d668d9a1.tar.gz
Did some rework for the state machine in a server context.
Removed the handler framework in favour of a TftpContextServer used as the session.
Diffstat (limited to 'tftpy/TftpClient.py')
-rw-r--r--tftpy/TftpClient.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tftpy/TftpClient.py b/tftpy/TftpClient.py
index da35d05..89843f1 100644
--- a/tftpy/TftpClient.py
+++ b/tftpy/TftpClient.py
@@ -52,12 +52,12 @@ class TftpClient(TftpSession):
# output? This should be in the sample client, but not in the download
# call.
if metrics.duration == 0:
- logger.info("Duration too short, rate undetermined")
+ log.info("Duration too short, rate undetermined")
else:
- logger.info('')
- logger.info("Downloaded %.2f bytes in %.2f seconds" % (metrics.bytes, metrics.duration))
- logger.info("Average rate: %.2f kbps" % metrics.kbps)
- logger.info("Received %d duplicate packets" % metrics.dupcount)
+ log.info('')
+ log.info("Downloaded %.2f bytes in %.2f seconds" % (metrics.bytes, metrics.duration))
+ log.info("Average rate: %.2f kbps" % metrics.kbps)
+ log.info("Received %d duplicate packets" % metrics.dupcount)
def upload(self, filename, input, packethook=None, timeout=SOCK_TIMEOUT):
# Open the input file.
@@ -80,9 +80,9 @@ class TftpClient(TftpSession):
# output? This should be in the sample client, but not in the download
# call.
if metrics.duration == 0:
- logger.info("Duration too short, rate undetermined")
+ log.info("Duration too short, rate undetermined")
else:
- logger.info('')
- logger.info("Downloaded %.2f bytes in %.2f seconds" % (metrics.bytes, metrics.duration))
- logger.info("Average rate: %.2f kbps" % metrics.kbps)
- logger.info("Received %d duplicate packets" % metrics.dupcount) \ No newline at end of file
+ log.info('')
+ log.info("Downloaded %.2f bytes in %.2f seconds" % (metrics.bytes, metrics.duration))
+ log.info("Average rate: %.2f kbps" % metrics.kbps)
+ log.info("Received %d duplicate packets" % metrics.dupcount)