Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csentry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Harrisson
csentry
Commits
1e12051d
Commit
1e12051d
authored
2 years ago
by
Anders Harrisson
Browse files
Options
Downloads
Patches
Plain Diff
Update pre-commit (black and flake8)
parent
fbb89d65
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.pre-commit-config.yaml
+2
-2
2 additions, 2 deletions
.pre-commit-config.yaml
app/tasks.py
+4
-8
4 additions, 8 deletions
app/tasks.py
with
6 additions
and
10 deletions
.pre-commit-config.yaml
+
2
−
2
View file @
1e12051d
repos
:
-
repo
:
https://github.com/psf/black
rev
:
2
0.8b1
rev
:
2
2.6.0
hooks
:
-
id
:
black
-
repo
:
https://gitlab.com/pycqa/flake8
rev
:
3.8.3
rev
:
4.0.1
hooks
:
-
id
:
flake8
This diff is collapsed.
Click to expand it.
app/tasks.py
+
4
−
8
View file @
1e12051d
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment