Fix check for installtype

Previously, this code was not checking for the proper environment
variable for an element's installtype. There was a line replacing '-'
with '_' as is required, but that value was not actually used when
searching for the environment variable.

Change-Id: I0bbd56969188389db81844d9276269464870f776
This commit is contained in:
James Slagle 2015-03-10 20:08:55 -04:00
parent 5617264aab
commit ba19541d47

View File

@ -25,8 +25,9 @@ import yaml
def get_element_installtype(element_name):
default = os.environ.get("DIB_DEFAULT_INSTALLTYPE", "source")
element_name.replace('-', '_')
return os.environ.get("DIB_INSTALLTYPE_%s" % element_name, default)
return os.environ.get(
"DIB_INSTALLTYPE_%s" % element_name.replace('-', '_'),
default)
def collect_data(data, filename, element_name):