mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 03:49:07 +02:00

Used print function instead of print statement to make the code work in python 3. [Changes from both Ed and Richard] (From OE-Core rev: ced1995694c394d92cb82fb9c25a33dc027a3b69) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 lines
529 B
Python
12 lines
529 B
Python
import argparse
|
|
|
|
def selftest_reverse(args, config, basepath, workspace):
|
|
"""Reverse the value passed to verify the plugin is executing."""
|
|
print(args.value[::-1])
|
|
|
|
def register_commands(subparsers, context):
|
|
parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)',
|
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
|
parser_build.add_argument('value', help='Value to reverse')
|
|
parser_build.set_defaults(func=selftest_reverse)
|