Skip to content

Commit

Permalink
Merge 6293004 into cef62b1
Browse files Browse the repository at this point in the history
  • Loading branch information
lubomir committed Sep 18, 2019
2 parents cef62b1 + 6293004 commit f405215
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rcm_nexus/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_password(self):
return self.password

def get_profile_id(self, product, is_ga):
profiles = self.profile_map.get(product)
profiles = self.profile_map.get(product.upper())
if profiles is None:
raise Exception( "No staging profiles found for: '%s' in environment: %s" % (product, self.name) )

Expand All @@ -65,7 +65,9 @@ def get_profile_id(self, product, is_ga):
return profile_id

def get_promote_profile_id(self, product, is_ga):
return self.profile_map[product][GA_PROMOTE_PROFILE if is_ga else EA_PROMOTE_PROFILE]
return self.profile_map[product.upper()][
GA_PROMOTE_PROFILE if is_ga else EA_PROMOTE_PROFILE
]

def __str__(self):
return """RCMNexusConfig [
Expand Down Expand Up @@ -126,7 +128,7 @@ def _read_config(path):
with open(path) as f:
parser.readfp(f)
for product in parser.sections():
result[product] = dict(parser.items(product))
result[product.upper()] = dict(parser.items(product))
return result


Expand Down

0 comments on commit f405215

Please sign in to comment.