Skip to content
Snippets Groups Projects
Commit 1e12051d authored by Anders Harrisson's avatar Anders Harrisson
Browse files

Update pre-commit (black and flake8)

parent fbb89d65
No related branches found
No related tags found
No related merge requests found
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.6.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
rev: 4.0.1
hooks:
- id: flake8
......@@ -106,14 +106,10 @@ def launch_awx_job(resource="job", **kwargs):
if job_template is None and inventory_source is None:
current_app.logger.warning("No job_template nor inventory_source passed!")
return "No job_template nor inventory_source passed!"
if (
job_template
in (
current_app.config["AWX_CREATE_VIOC"],
current_app.config["AWX_CREATE_VM"],
)
and not current_app.config.get("AWX_VM_CREATION_ENABLED", False)
):
if job_template in (
current_app.config["AWX_CREATE_VIOC"],
current_app.config["AWX_CREATE_VM"],
) and not current_app.config.get("AWX_VM_CREATION_ENABLED", False):
current_app.logger.info("AWX VM creation is disabled. Not sending any request.")
return "AWX VM creation not triggered"
if not current_app.config.get("AWX_JOB_ENABLED", False):
......
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