Skip to content
Snippets Groups Projects
Commit 61eaf1ec authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent 1916cdd5
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
#!/usr/bin/python3
RETURN = '''# '''
......@@ -54,7 +54,7 @@ def main():
else:
git = gitlab.Gitlab(server_url, login_token, ssl_verify=verify_ssl) # type: gitlab
git.auth()
except Exception, e:
except Exception as e:
module.fail_json(msg="Failed to connect to Gitlab server: %s " % e)
return
......@@ -82,7 +82,7 @@ def main():
'key': open('/root/.ssh/id_rsa.pub').read(),
'can_push': True,
})
except Exception, e:
except Exception as e:
module.fail_json(msg="Creating new host project failed: %s" % e.message, response=e)
return
......
#!/usr/bin/python
#!/usr/bin/python3
RETURN = '''# '''
......@@ -196,7 +196,7 @@ def main():
else:
git = gitlab.Gitlab(server_url, login_token, ssl_verify=verify_ssl) # type: gitlab
git.auth()
except Exception, e:
except Exception as e:
module.fail_json(msg="Failed to connect to Gitlab server: %s " % e)
return
......@@ -272,7 +272,7 @@ def main():
delay *= 2
try:
issue = metaProject.project.issues.create(arguments) # type: gitlab.Issue
except Exception, e:
except Exception as e:
pass
if issue:
retries = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment