Pep8 fixes for taiga_issue module (#24143)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-05-01 20:28:59 +05:30 committed by Matt Martz
parent bb8666471d
commit 806506c032
2 changed files with 13 additions and 8 deletions

View file

@ -135,6 +135,7 @@ try:
except ImportError:
TAIGA_MODULE_IMPORTED = False
def manage_issue(module, taiga_host, project_name, issue_subject, issue_priority,
issue_status, issue_type, issue_severity, issue_description,
issue_attachment, issue_attachment_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), {})
except TaigaException:
msg = "An exception happened: %s" % sys.exc_info()[1]
exc = get_exception()
msg = "An exception happened: %s" % exc
return (False, changed, msg, {})
def main():
module = AnsibleModule(
argument_spec=dict(
@ -262,7 +265,8 @@ def main():
attachment=dict(required=False, default=None),
attachment_description=dict(required=False, default=""),
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
)
@ -313,6 +317,8 @@ def main():
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__':
main()

View file

@ -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/jira.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_dns_client.py
lib/ansible/modules/windows/win_domain.py