]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: upgrade: reformat --no-patch warning message
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 30 Oct 2017 22:30:49 +0000 (11:30 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Nov 2017 14:44:31 +0000 (14:44 +0000)
* Only log one warning message instead of one per line
* Be a bit more verbose
* "if list" is more pythonic than "if len(list)"

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/upgrade.py

index 0db2a50e9010910a68870e40f0886a6fd87487bd..3cb523c2f4f3b6676f3db9e33fbd403c6a813b74 100644 (file)
@@ -263,10 +263,8 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
 
     if no_patch:
         patches = oe.recipeutils.get_recipe_patches(crd)
-        if len(patches):
-            logger.warn('By user choice, the following patches will NOT be applied')
-            for patch in patches:
-                logger.warn("%s" % os.path.basename(patch))
+        if patches:
+            logger.warn('By user choice, the following patches will NOT be applied to the new source tree:\n  %s' % '\n  '.join([os.path.basename(patch) for patch in patches]))
     else:
         __run('git checkout devtool-patched -b %s' % branch)
         skiptag = False