diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-06-02 14:46:13 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2011-06-02 14:46:16 -0700 |
commit | ec8a5a495b72e061a1e8d7c7449afb26581872c0 (patch) | |
tree | be72fb6bd39811a5b9496c204233baa7c99a50cb /lib | |
parent | 8e1be0ca414d9d26e013ae212abdd9c39fa8df26 (diff) | |
download | bitbake-ec8a5a495b72e061a1e8d7c7449afb26581872c0.tar.gz |
siggen: don't choke with traceback when data is None
Given we use bb.error, not bb.fatal, here, it seems this was intended to be
non-fatal, yet we'd end up trying to concatenate None. Fix this by setting an
empty task to the empty string, for the purposes of hashing. Also str() the
value we get from the datastore, just in case something other than a string
was stored there.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/siggen.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py index 550280339..a9c84c474 100644 --- a/lib/bb/siggen.py +++ b/lib/bb/siggen.py @@ -82,6 +82,10 @@ class SignatureGeneratorBasic(SignatureGenerator): data = d.getVar(task, False) lookupcache[task] = data + if data is None: + bb.error("Task %s from %s seems to be empty?!" % (task, fn)) + data = '' + newdeps = gendeps[task] seen = set() while newdeps: @@ -103,9 +107,7 @@ class SignatureGeneratorBasic(SignatureGenerator): var = d.getVar(dep, False) lookupcache[dep] = var if var: - data = data + var - if data is None: - bb.error("Task %s from %s seems to be empty?!" % (task, fn)) + data = data + str(var) self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest() taskdeps[task] = sorted(alldeps) |