Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
6e1f9f1a
Commit
6e1f9f1a
authored
1 year ago
by
Rafael Guterres Jeffman
Browse files
Options
Downloads
Patches
Plain Diff
pylint: Fix redefined-builtin
parent
46a307aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/facts.py
+8
-8
8 additions, 8 deletions
utils/facts.py
with
8 additions
and
8 deletions
utils/facts.py
+
8
−
8
View file @
6e1f9f1a
import
os
def
get_roles
(
dir
):
def
get_roles
(
dir
ectory
):
roles
=
[]
_rolesdir
=
"
%s/roles/
"
%
dir
_rolesdir
=
"
%s/roles/
"
%
dir
ectory
for
_role
in
os
.
listdir
(
_rolesdir
):
_roledir
=
"
%s/%s
"
%
(
_rolesdir
,
_role
)
if
not
os
.
path
.
isdir
(
_roledir
)
or
\
...
...
@@ -16,19 +16,19 @@ def get_roles(dir):
return
sorted
(
roles
)
def
get_modules
(
dir
):
def
get_modules
(
dir
ectory
):
management_modules
=
[]
roles_modules
=
[]
for
root
,
_dirs
,
files
in
os
.
walk
(
dir
):
if
not
root
.
startswith
(
"
%s/plugins/
"
%
dir
)
and
\
not
root
.
startswith
(
"
%s/roles/
"
%
dir
):
for
root
,
_dirs
,
files
in
os
.
walk
(
dir
ectory
):
if
not
root
.
startswith
(
"
%s/plugins/
"
%
dir
ectory
)
and
\
not
root
.
startswith
(
"
%s/roles/
"
%
dir
ectory
):
continue
for
_file
in
files
:
if
_file
.
endswith
(
"
.py
"
):
if
root
==
"
%s/plugins/modules
"
%
dir
:
if
root
==
"
%s/plugins/modules
"
%
dir
ectory
:
management_modules
.
append
(
_file
[:
-
3
])
elif
root
.
startswith
(
"
%s/roles/
"
%
dir
):
elif
root
.
startswith
(
"
%s/roles/
"
%
dir
ectory
):
if
root
.
endswith
(
"
/library
"
):
roles_modules
.
append
(
_file
[:
-
3
])
...
...
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