Skip to contentSkip to conversation

layer.conf: fix syntax error in PATH setting

PATCH New Matt Madison 1 participant 1 message Nov 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 layer.conf: fix syntax error in PATH setting

Commit 05a87be51b44608ce4f77ac332df90a3cd2445ef introduced a Python conditional expression when updating PATH that generates syntax warnings in bitbake-cookerdaemon.log:

Var <PATH[:=]>:1: SyntaxWarning: "is not" with a literal. Did you mean "!="?

Fix this by using the more appropriate '!=' comparison operator.

---
 meta/conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/layer.conf +1 -1
index 2d9cd05695..cda37c33b4 100644
@@ -104,4 +104,4 @@ SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native"
 # We need to keep bitbake tools in PATH
 # Avoid empty path entries
 BITBAKEPATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}"
-PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' is not '' else ''}${HOSTTOOLS_DIR}"
+PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${HOSTTOOLS_DIR}"
Signature · 1 line
2.25.1