[Bitbake-dev] [PATCH] Fix comparison with SRCREVINACTION string constant.

Javier Martin javier.martin at vista-silicon.com
Thu Jan 27 09:38:21 CET 2011


Use '==' instead of 'is', otherwise it will always return
true since 'rev' and "SRCREVINACTION" are not the same object.

Signed-off-by: Javier Martin <javier.martin at vista-silicon.com>
---
 lib/bb/fetch/__init__.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py
index d87ff0a..62ba4ea 100644
--- a/lib/bb/fetch/__init__.py
+++ b/lib/bb/fetch/__init__.py
@@ -699,7 +699,7 @@ class Fetch(object):
             raise InvalidSRCREV("Please set SRCREV to a valid value")
         if not rev:
             return False
-        if rev is "SRCREVINACTION":
+        if rev == "SRCREVINACTION":
             return True
         return rev
 
-- 
1.7.0.4




More information about the bitbake-devel mailing list