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