[U-Boot] [PATCH] patman: Allow use outside of u-boot tree

Doug Anderson dianders at chromium.org
Wed Jan 9 23:57:55 CET 2013


Vadim,

On Wed, Jan 9, 2013 at 2:07 PM, Vadim Bendebury <vbendeb at chromium.org> wrote:
>>> +parser.add_option('--no-check', action='store_true', dest='no_check',
>>> +                  default=False,
>>> +                  help="Don't check for patch compliance")
>>
>> IMHO It would be slightly better to use action='store_false',
>> dest='check', and default=True (just to avoid so many
>> double-negatives).
>
> I don't quite agree with this part - I think it's perfectly reasonable
> to use 'no-check' to suppress the check, just as well as to use
> 'no-tags' to suppress interpreting tags.
>
> `--no' communicates that by default the respective feature is enabled,
> and to disable it one needs to add a command line option with no
> parameter.

Sorry--should have been more explicit.  Was still expecting the option
to be --no-check.  Just asking for a change to the way it's stored.
Like this in the python dev guide:

parser.add_option("--clobber", action="store_true", dest="clobber")
parser.add_option("--no-clobber", action="store_false", dest="clobber")

In your case, I don't think you need to add the "check" option too,
but just store to the "check" option:

parser.add_option('--no-check', action='store_false', dest='check',
                  default=True,
                  help="Don't check for patch compliance")


More information about the U-Boot mailing list