On 24 September 2015 at 10:33, Lucian Musat <[email protected]>
wrote:
> (options, args) = parser.parse_args()
> if len(args) != 1:
> - parser.error("Incorrect number of arguments. The one and only
> argument should be a json file exported by the build system")
> + args.append("testdata.json") #default file name
>
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).
Ross
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core