summaryrefslogtreecommitdiff
path: root/tftpy/TftpClient.py
diff options
context:
space:
mode:
authorMichael P. Soulier <msoulier@digitaltorque.ca>2010-05-25 21:51:07 -0400
committerMichael P. Soulier <msoulier@digitaltorque.ca>2010-05-25 21:51:07 -0400
commit58623df7d08fa88c9b869f89798e85b6c5e626e8 (patch)
treefcdde75c59aa627f226192ca7afed2d92c990b39 /tftpy/TftpClient.py
parentf4a3ff6356a32485b7c1cf98b188e0886390387e (diff)
downloadtftpy-58623df7d08fa88c9b869f89798e85b6c5e626e8.tar.gz
Adding support for input/output as stdin/stdout
Diffstat (limited to 'tftpy/TftpClient.py')
-rw-r--r--tftpy/TftpClient.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tftpy/TftpClient.py b/tftpy/TftpClient.py
index 5bf4658..afe1bf0 100644
--- a/tftpy/TftpClient.py
+++ b/tftpy/TftpClient.py
@@ -33,7 +33,9 @@ class TftpClient(TftpSession):
copy of each DAT packet received in the form of a TftpPacketDAT
object. The timeout parameter may be used to override the default
SOCK_TIMEOUT setting, which is the amount of time that the client will
- wait for a receive packet to arrive."""
+ wait for a receive packet to arrive.
+
+ Note: If output is a hyphen then stdout is used."""
# We're downloading.
log.debug("Creating download context with the following params:")
log.debug("host = %s, port = %s, filename = %s, output = %s"
@@ -64,6 +66,7 @@ class TftpClient(TftpSession):
log.info("Received %d duplicate packets" % metrics.dupcount)
def upload(self, filename, input, packethook=None, timeout=SOCK_TIMEOUT):
+ """Note: If input is a hyphen then stdin is used."""
# Open the input file.
# FIXME: As of the state machine, this is now broken. Need to
# implement with new state machine.