Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
Seblu
installsystems
Commits
5b219aa2
Commit
5b219aa2
authored
13 years ago
by
Sebastien Luttringer
Browse files
Options
Downloads
Patches
Plain Diff
select_payloads take a list of pattern
parent
8c4d69b9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installsystems/repository.py
+7
-8
7 additions, 8 deletions
installsystems/repository.py
with
7 additions
and
8 deletions
installsystems/repository.py
+
7
−
8
View file @
5b219aa2
...
...
@@ -760,7 +760,7 @@ class RepositoryManager(object):
if
len
(
s
)
>
0
:
out
(
s
)
def
select_payloads
(
self
,
pattern
):
def
select_payloads
(
self
,
pattern
s
):
'''
Return a list of available payloads
'''
...
...
@@ -775,20 +775,19 @@ class RepositoryManager(object):
else
:
paylist
[
md5
][
"
images
"
].
update
(
info
[
"
images
"
])
# check if pattern is md5 startpath
if
pattern
is
not
None
:
ans
=
{}
for
pattern
in
patterns
:
for
md5
in
paylist
.
keys
():
if
not
md5
.
startswith
(
pattern
):
del
paylist
[
md5
]
return
paylist
if
md5
.
startswith
(
pattern
):
ans
[
md5
]
=
paylist
[
md5
]
return
ans
def
show_payloads
(
self
,
patterns
,
o_images
=
False
,
o_json
=
False
):
'''
Show payloads inside manager
'''
# get payload list
payloads
=
{}
for
pattern
in
patterns
:
payloads
.
update
(
self
.
select_payloads
(
pattern
))
payloads
=
self
.
select_payloads
(
patterns
)
# display result
if
o_json
:
s
=
json
.
dumps
(
payloads
)
...
...
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