Skip to content

Commit

Permalink
Merge pull request #59 from schubergphilis/fix-gov-regions
Browse files Browse the repository at this point in the history
  • Loading branch information
costastf authored Nov 28, 2023
2 parents 0c8432a + 425a354 commit 262c699
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions awsapilib/controltower/controltower.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,11 @@ def get_available_regions():
if not response.ok:
LOGGER.error('Failed to retrieve the info')
return []
return [entry.get('id', '').split(':')[1]
for entry in response.json().get('prices')
if entry.get('id').startswith('controltower')]
regions = [entry.get('id', '').split(':')[1]
for entry in response.json().get('prices')
if all([entry.get('id').startswith('controltower'),
'gov' not in entry.get('id')])]
return regions

@property
@validate_availability
Expand Down Expand Up @@ -695,6 +697,7 @@ def get_ou_ids(parent_id):
result.extend(get_ou_ids(org_ou.id))
except TypeError:
continue

get_ou_ids(self.root_ou.id)
return result

Expand Down

0 comments on commit 262c699

Please sign in to comment.