os_user: fix module undefined

module variable in the function is undefined. Pass it.

fix "NameError: name 'module' is not defined"
This commit is contained in:
Guillaume Coré 2017-04-14 15:55:49 +02:00 committed by Toshio Kuratomi
parent a86878c425
commit a5c70dc672

View file

@ -177,7 +177,7 @@ def _get_domain_id(cloud, domain):
return domain_id
def _get_default_project_id(cloud, default_project):
def _get_default_project_id(cloud, default_project, module):
project = cloud.get_project(default_project)
if not project:
module.fail_json(msg='Default project %s is not valid' % default_project)
@ -232,7 +232,7 @@ def main():
module.fail_json(msg=msg)
default_project_id = None
if default_project:
default_project_id = _get_default_project_id(cloud, default_project)
default_project_id = _get_default_project_id(cloud, default_project, module)
if user is None:
user = cloud.create_user(