From: Chris Laplante <chris.lapla...@agilent.com> 1. Bad None comparison 2. Reliance on transitive includes in bb 3. Unbound 'ret' variable
Signed-off-by: Chris Laplante <chris.lapla...@agilent.com> --- scripts/devtool | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index b43a958497..1994d4b507 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -45,7 +45,7 @@ class ConfigHandler: try: ret = self.config_obj.get(section, option) except (configparser.NoOptionError, configparser.NoSectionError): - if default != None: + if default is not None: ret = default else: raise @@ -147,7 +147,7 @@ def create_workspace(args, config, basepath, workspace): _enable_workspace_layer(workspacedir, config, basepath) def _create_workspace(workspacedir, config, basepath, layerseries=None): - import bb + import bb.utils confdir = os.path.join(workspacedir, 'conf') if os.path.exists(os.path.join(confdir, 'layer.conf')): @@ -192,7 +192,7 @@ def _create_workspace(workspacedir, config, basepath, layerseries=None): def _enable_workspace_layer(workspacedir, config, basepath): """Ensure the workspace layer is in bblayers.conf""" - import bb + import bb.utils bblayers_conf = os.path.join(basepath, 'conf', 'bblayers.conf') if not os.path.exists(bblayers_conf): logger.error('Unable to find bblayers.conf') @@ -286,6 +286,7 @@ def main(): scriptutils.logger_setup_color(logger, global_args.color) if global_args.bbpath is None: + import bb try: tinfoil = setup_tinfoil(config_only=True, basepath=basepath) try: @@ -341,6 +342,7 @@ def main(): ret = err.exitcode except argparse_oe.ArgumentUsageError as ae: parser.error_subcommand(ae.message, ae.subcommand) + ret = 2 return ret -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#209693): https://lists.openembedded.org/g/openembedded-core/message/209693 Mute This Topic: https://lists.openembedded.org/mt/110569678/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-