Pep8 fixes for taiga_issue module (#24143)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
bb8666471d
commit
806506c032
2 changed files with 13 additions and 8 deletions
|
@ -131,9 +131,10 @@ from os.path import isfile
|
||||||
try:
|
try:
|
||||||
from taiga import TaigaAPI
|
from taiga import TaigaAPI
|
||||||
from taiga.exceptions import TaigaException
|
from taiga.exceptions import TaigaException
|
||||||
TAIGA_MODULE_IMPORTED=True
|
TAIGA_MODULE_IMPORTED = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
TAIGA_MODULE_IMPORTED=False
|
TAIGA_MODULE_IMPORTED = False
|
||||||
|
|
||||||
|
|
||||||
def manage_issue(module, taiga_host, project_name, issue_subject, issue_priority,
|
def manage_issue(module, taiga_host, project_name, issue_subject, issue_priority,
|
||||||
issue_status, issue_type, issue_severity, issue_description,
|
issue_status, issue_type, issue_severity, issue_description,
|
||||||
|
@ -245,9 +246,11 @@ def manage_issue(module, taiga_host, project_name, issue_subject, issue_priority
|
||||||
return (False, changed, "More than one issue with subject %s in project %s" % (issue_subject, project_name), {})
|
return (False, changed, "More than one issue with subject %s in project %s" % (issue_subject, project_name), {})
|
||||||
|
|
||||||
except TaigaException:
|
except TaigaException:
|
||||||
msg = "An exception happened: %s" % sys.exc_info()[1]
|
exc = get_exception()
|
||||||
|
msg = "An exception happened: %s" % exc
|
||||||
return (False, changed, msg, {})
|
return (False, changed, msg, {})
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
|
@ -262,7 +265,8 @@ def main():
|
||||||
attachment=dict(required=False, default=None),
|
attachment=dict(required=False, default=None),
|
||||||
attachment_description=dict(required=False, default=""),
|
attachment_description=dict(required=False, default=""),
|
||||||
tags=dict(required=False, default=[], type='list'),
|
tags=dict(required=False, default=[], type='list'),
|
||||||
state=dict(required=False, choices=['present','absent'], default='present'),
|
state=dict(required=False, choices=['present', 'absent'],
|
||||||
|
default='present'),
|
||||||
),
|
),
|
||||||
supports_check_mode=True
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
@ -313,6 +317,8 @@ def main():
|
||||||
module.fail_json(msg=msg)
|
module.fail_json(msg=msg)
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.pycompat24 import get_exception
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -785,7 +785,6 @@ lib/ansible/modules/web_infrastructure/jenkins_job.py
|
||||||
lib/ansible/modules/web_infrastructure/jenkins_script.py
|
lib/ansible/modules/web_infrastructure/jenkins_script.py
|
||||||
lib/ansible/modules/web_infrastructure/jira.py
|
lib/ansible/modules/web_infrastructure/jira.py
|
||||||
lib/ansible/modules/web_infrastructure/letsencrypt.py
|
lib/ansible/modules/web_infrastructure/letsencrypt.py
|
||||||
lib/ansible/modules/web_infrastructure/taiga_issue.py
|
|
||||||
lib/ansible/modules/windows/win_disk_image.py
|
lib/ansible/modules/windows/win_disk_image.py
|
||||||
lib/ansible/modules/windows/win_dns_client.py
|
lib/ansible/modules/windows/win_dns_client.py
|
||||||
lib/ansible/modules/windows/win_domain.py
|
lib/ansible/modules/windows/win_domain.py
|
||||||
|
|
Loading…
Reference in a new issue