mirror of
https://git.yoctoproject.org/poky
synced 2026-05-07 16:59:22 +00:00
oeqa/sdk/context.py: Import argparse_oe at OESDKTestContext.run method
This import was at level of OESDKTestContext.register_commands but OESDKTestContext.run method need it to raise exceptions. (From OE-Core rev: 35efb419de1dbebd269d87895645934707130746) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f3f40fe97b
commit
13175d8d48
@@ -44,8 +44,6 @@ class OESDKTestContextExecutor(OETestContextExecutor):
|
||||
default_test_data = None
|
||||
|
||||
def register_commands(self, logger, subparsers):
|
||||
import argparse_oe
|
||||
|
||||
super(OESDKTestContextExecutor, self).register_commands(logger, subparsers)
|
||||
|
||||
sdk_group = self.parser.add_argument_group('sdk options')
|
||||
@@ -109,6 +107,8 @@ class OESDKTestContextExecutor(OETestContextExecutor):
|
||||
log(env)
|
||||
|
||||
def run(self, logger, args):
|
||||
import argparse_oe
|
||||
|
||||
if not args.sdk_dir:
|
||||
raise argparse_oe.ArgumentUsageError("No SDK directory "\
|
||||
"specified please do, --sdk-dir SDK_DIR", self.name)
|
||||
|
||||
Reference in New Issue
Block a user