organizations support: add exception handling for describe_organizations

This commit is contained in:
Ashley Gould 2018-07-26 12:20:43 -07:00
parent 4356e951e1
commit b8be517be0

View File

@ -157,6 +157,11 @@ class OrganizationsBackend(BaseBackend):
return self.org.describe()
def describe_organization(self):
if not self.org:
raise RESTError(
'AWSOrganizationsNotInUseException',
"Your account is not a member of an organization."
)
return self.org.describe()
def list_roots(self):