<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 24 September 2015 at 10:33, Lucian Musat <span dir="ltr"><<a href="mailto:george.l.musat@intel.com" target="_blank">george.l.musat@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":80d" class="a3s" style="overflow:hidden"> (options, args) = parser.parse_args()<br>
if len(args) != 1:<br>
- parser.error("Incorrect number of arguments. The one and only argument should be a json file exported by the build system")<br>
+ args.append("testdata.json") #default file name</div></blockquote></div><br>OptionParser is deprecated so if you do the fairly trivial port to argparse then you can handle this directly in the option definitions (define an optional positional argument with a default value).</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ross</div></div>