Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2 09/10] devtool: remove some unused return values
Date: Wed, 17 Jun 2015 14:20:23 +0300	[thread overview]
Message-ID: <1434540023.12084.69.camel@linux.intel.com> (raw)
In-Reply-To: <2071087.3Bvkg31YSM@peggleto-mobl.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

Hi Paul,

On Wed, 2015-06-17 at 10:36 +0100, Paul Eggleton wrote:
> On Thursday 11 June 2015 14:34:15 Markus Lehtonen wrote:
> > Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
> > ---
> >  scripts/devtool                 | 1 -
> >  scripts/lib/devtool/standard.py | 3 ---
> >  2 files changed, 4 deletions(-)
> > 
> > diff --git a/scripts/devtool b/scripts/devtool
> > index 0100eb8..307846a 100755
> > --- a/scripts/devtool
> > +++ b/scripts/devtool
> > @@ -157,7 +157,6 @@ def _enable_workspace_layer(workspacedir, config,
> > basepath): bblayers_conf = os.path.join(basepath, 'conf', 'bblayers.conf')
> > if not os.path.exists(bblayers_conf):
> >          logger.error('Unable to find bblayers.conf')
> > -        return -1
> 
> I appreciate the actually returned value might not be used, but simply 
> dropping the return entirely allows the function to continue after the error, 
> which is wrong.

Uh oh, stupid mistake. Thanks for spotting that!

You can find a fixed patch, attached. I also pushed a fixed version of
the patchset to
git://git.openembedded.org/openembedded-core-contrib
marquiz/devtool/refactor



Thanks,
  Markus

[-- Attachment #2: v3-0009-devtool-remove-some-unused-return-values.patch --]
[-- Type: text/x-patch, Size: 1487 bytes --]

From 30401a4f075057e0c8eca9aaaae7e45591baf7c4 Mon Sep 17 00:00:00 2001
From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Date: Wed, 27 May 2015 17:40:49 +0300
Subject: [PATCH v3 09/10] devtool: remove some unused return values

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
 scripts/devtool                 | 2 +-
 scripts/lib/devtool/standard.py | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/devtool b/scripts/devtool
index 0100eb8..fd4af98 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -157,7 +157,7 @@ def _enable_workspace_layer(workspacedir, config, basepath):
     bblayers_conf = os.path.join(basepath, 'conf', 'bblayers.conf')
     if not os.path.exists(bblayers_conf):
         logger.error('Unable to find bblayers.conf')
-        return -1
+        return
     _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path)
     if added:
         logger.info('Enabling workspace layer in bblayers.conf')
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index fb3cc78..14912a9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -417,9 +417,6 @@ def _check_preserve(config, recipename):
                     tf.write(line)
     os.rename(newfile, origfile)
 
-    return False
-
-
 def modify(args, config, basepath, workspace):
     """Entry point for the devtool 'modify' subcommand"""
     import bb
-- 
2.1.4


  reply	other threads:[~2015-06-17 11:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 11:34 [PATCH v2 00/10] devtool refactoring Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 01/10] devtool: fix wrong indentation Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 02/10] devtool: refactor bb task execution into a separate class Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 03/10] devtool: update-recipe: do rev parsing in a separate function Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 04/10] devtool: simplify the logic of determining patches to be removed Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 05/10] devtool: simplify few conditionals a bit Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 06/10] devtool: slight simplification of path splitting logic Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 07/10] devtool: split out 'srcrev' update mode into a separate function Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 08/10] devtool: split out 'patch' " Markus Lehtonen
2015-06-11 11:34 ` [PATCH v2 09/10] devtool: remove some unused return values Markus Lehtonen
2015-06-17  9:36   ` Paul Eggleton
2015-06-17 11:20     ` Markus Lehtonen [this message]
2015-06-11 11:34 ` [PATCH v2 10/10] devtool: use DevtoolError for error handling Markus Lehtonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434540023.12084.69.camel@linux.intel.com \
    --to=markus.lehtonen@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox