[OE-core] [wic patch 2/5] wic: Use argparse instead of optparse

Burton, Ross ross.burton at intel.com
Sun Apr 23 19:58:44 UTC 2017


On 21 April 2017 at 13:11, Andreas J. Reichel <andreas.reichel at tngtech.com>
wrote:

> * optparse is deprecated and will not be developed further
>     (see: https://docs.python.org/2/library/optparse.html)
> * argparse supports subcommands, which simplifies definition of
>     arguments and options
> * reimplement help mechanism through sub-subcommands
>

This results in a behaviour change and breaks the selftest:

FAIL [0.535s]: test_unsupported_subcommand (oeqa.selftest.wic.Wic)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py",
line 109, in wrapped_f
    return func(*args, **kwargs)
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py",
line 163, in test_unsupported_subcommand
    ignore_status=True).status)
AssertionError: 1 != 2

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170423/8b2f9908/attachment-0002.html>


More information about the Openembedded-core mailing list