Skip to content

fixed argument passing #2209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/espota.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Changes
# 2015-11-09:
# - Added digest authentication
# - Enchanced error tracking and reporting
# - Enhanced error tracking and reporting
#
# Changes
# 2016-01-03:
Expand Down Expand Up @@ -199,7 +199,7 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
# end serve


def parser():
def parser(unparsed_args):
parser = optparse.OptionParser(
usage = "%prog [options]",
description = "Transmit image over the air to the esp8266 module with OTA support."
Expand Down Expand Up @@ -275,15 +275,15 @@ def parser():
)
parser.add_option_group(group)

(options, args) = parser.parse_args()
(options, args) = parser.parse_args(unparsed_args)

return options
# end parser


def main(args):
# get options
options = parser()
options = parser(args)

# adapt log level
loglevel = logging.WARNING
Expand Down