diff options
author | Chris Larson <clarson@kergoth.com> | 2004-01-23 10:02:30 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-01-23 10:02:30 +0000 |
commit | fd126f444a7ad42b0bd03c68bfdd5199497b6bda (patch) | |
tree | dfc5f0409cbc8b1517acbdbff0e89f4a82c1fa03 /bin/oe/data.py | |
parent | 0efd23c1da44c113a9f78975f468d73f52be635c (diff) | |
download | bitbake-fd126f444a7ad42b0bd03c68bfdd5199497b6bda.tar.gz |
Alter data handling functions to skip operation on non-string metadata.
Diffstat (limited to 'bin/oe/data.py')
-rw-r--r-- | bin/oe/data.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/oe/data.py b/bin/oe/data.py index e81398918..cd520cc45 100644 --- a/bin/oe/data.py +++ b/bin/oe/data.py @@ -10,7 +10,7 @@ Copyright: (c) 2003 Chris Larson Based on functions from the base oe module, Copyright 2003 Holger Schurig """ -import sys, os, time +import sys, os, time, types if sys.argv[0][-5:] == "pydoc": path = os.path.dirname(os.path.dirname(sys.argv[1])) else: @@ -213,11 +213,10 @@ def expand(s, d = _data): import oe locals()['d'] = d s = eval(code) - import types if type(s) == types.IntType: s = str(s) return s - if s is None: # sanity check + if type(s) is not types.StringType: # sanity check return s while s.find('$') != -1: @@ -259,7 +258,7 @@ def expandData(alterdata = _data, readdata = None): for key in alterdata.keys(): val = getVar(key, alterdata) - if val is None: + if type(val) is not types.StringType: continue expanded = expand(val, readdata) # print "key is %s, val is %s, expanded is %s" % (key, val, expanded) @@ -298,8 +297,8 @@ def emit_var(var, o=sys.__stdout__, d = _data): return 0 val = getVar(var, d, 1) - if val is None: - debug(2, "Warning, %s variable is None, not emitting" % var) + if type(val) is not types.StringType: + debug(2, "Warning, %s variable is not a string, not emitting" % var) return 0 if var.find("-") != -1 or var.find(".") != -1 or var.find('{') != -1 or var.find('}') != -1 or var.find('+') != -1: |