diff options
author | Michael P. Soulier <msoulier@digitaltorque.ca> | 2010-05-24 08:25:49 -0400 |
---|---|---|
committer | Michael P. Soulier <msoulier@digitaltorque.ca> | 2010-05-24 08:25:49 -0400 |
commit | f4a3ff6356a32485b7c1cf98b188e0886390387e (patch) | |
tree | 2a8458a3716c0dfc6ec31b79e8e73cc801067a8f | |
parent | 1a2b55677135e64c2a623b46b6861f2e5c726f2f (diff) | |
download | tftpy-f4a3ff6356a32485b7c1cf98b188e0886390387e.tar.gz |
Fixing failure to set default blocksize if options were provided but blksize
was not one of them.
-rw-r--r-- | tftpy/TftpStates.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py index ac464b9..f99d7c9 100644 --- a/tftpy/TftpStates.py +++ b/tftpy/TftpStates.py @@ -408,13 +408,14 @@ class TftpState(object): if not self.context.tidport: self.context.tidport = rport log.info("Setting tidport to %s" % rport) - if not options: - log.debug("Setting default options, blksize") - # FIXME: put default options elsewhere - self.context.options = { 'blksize': DEF_BLKSIZE } - else: + + log.debug("Setting default options, blksize") + self.context.options = { 'blksize': DEF_BLKSIZE } + + if options: log.debug("Options requested: %s" % options) - self.context.options = self.returnSupportedOptions(options) + supported_options = self.returnSupportedOptions(options) + self.context.options.update(supported_options) sendoack = True # FIXME - only octet mode is supported at this time. |