Skip to contentSkip to conversation

utils: Drop datastore function inspection during exception

PATCH New Richard Purdie 1 participant 1 message Feb 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils: Drop datastore function inspection during exception

When we use functions from the data store, they now have correct line number and filename information. This function would attempt to correct line numbers which doesn't need correcting, leading to misleading messages to the user. Therefore remove this code as being obsoleted.

bitbake/lib/bb/utils.py +0 -9
index 9730b51..3f33e84 100644
@@ -363,15 +363,6 @@ def _print_exception(t, value, tb, realfile, text, context):
                         error.extend(_print_trace(text, tbextract[level+1][1]))
                 except:
                     error.append(tbformat[level+1])
-            elif "d" in context and tbextract[level+1][2]:
-                # Try and find the code in the datastore based on the functionname
-                d = context["d"]
-                functionname = tbextract[level+1][2]
-                text = d.getVar(functionname, True)
-                if text:
-                    error.extend(_print_trace(text.split('\n'), tbextract[level+1][1]))
-                else:
-                    error.append(tbformat[level+1])
             else:
                 error.append(tbformat[level+1])
             nexttb = tb.tb_next