summaryrefslogtreecommitdiff
path: root/tftpy/TftpClient.py
diff options
context:
space:
mode:
authorMichael P. Soulier <msoulier@digitaltorque.ca>2016-07-04 08:28:59 -0400
committerMichael P. Soulier <msoulier@digitaltorque.ca>2016-07-04 08:28:59 -0400
commit44f8b49024ab1fcf345e263da852d0ede0cf155e (patch)
treeb3c1d98565afc3839b5091027ea415b7ace96388 /tftpy/TftpClient.py
parent77af4ea3fec68297be25cb96990040c81d2c4c4e (diff)
parent22d8f1b4a66114914c6dbf0d634651a1e0d6eff6 (diff)
downloadtftpy-44f8b49024ab1fcf345e263da852d0ede0cf155e.tar.gz
Merging with master
Diffstat (limited to 'tftpy/TftpClient.py')
-rw-r--r--tftpy/TftpClient.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tftpy/TftpClient.py b/tftpy/TftpClient.py
index 2b6992e..b7b9f27 100644
--- a/tftpy/TftpClient.py
+++ b/tftpy/TftpClient.py
@@ -12,13 +12,14 @@ class TftpClient(TftpSession):
download can be initiated via the download() method, or an upload via the
upload() method."""
- def __init__(self, host, port, options={}):
+ def __init__(self, host, port, options={}, localip = ""):
TftpSession.__init__(self)
self.context = None
self.host = host
self.iport = port
self.filename = None
self.options = options
+ self.localip = localip
if 'blksize' in self.options:
size = self.options['blksize']
tftpassert(types.IntType == type(size), "blksize must be an int")
@@ -48,7 +49,8 @@ class TftpClient(TftpSession):
output,
self.options,
packethook,
- timeout)
+ timeout,
+ localip = self.localip)
self.context.start()
# Download happens here
self.context.end()
@@ -82,7 +84,8 @@ class TftpClient(TftpSession):
input,
self.options,
packethook,
- timeout)
+ timeout,
+ localip = self.localip)
self.context.start()
# Upload happens here
self.context.end()