Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mailman-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
irt-public
mailman-tools
Commits
387f416a
Commit
387f416a
authored
6 years ago
by
Mr. Dmitry Makovey
Browse files
Options
Downloads
Patches
Plain Diff
add formatting/filtering to output for held messages
parent
6d9bd64f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
manage_list.py
+11
-3
11 additions, 3 deletions
manage_list.py
with
11 additions
and
3 deletions
manage_list.py
+
11
−
3
View file @
387f416a
...
...
@@ -27,9 +27,15 @@ def held_list(args):
client
,
ml
=
get_ml
(
args
)
held_data
=
{}
for
held
in
ml
.
held
:
held_data
[
held
.
request_id
]
=
held
.
rest_data
if
not
args
.
detailed
:
del
held_data
[
held
.
request_id
][
'
msg
'
]
if
args
.
fields
:
data_hash
=
{}
for
f
in
args
.
fields
:
data_hash
[
f
]
=
held
.
rest_data
[
f
]
held_data
[
held
.
request_id
]
=
data_hash
else
:
held_data
[
held
.
request_id
]
=
held
.
rest_data
if
not
args
.
detailed
:
del
held_data
[
held
.
request_id
][
'
msg
'
]
print
json
.
dumps
(
held_data
,
indent
=
2
)
...
...
@@ -108,6 +114,8 @@ if __name__ == '__main__':
held_list_parser
.
add_argument
(
'
--detailed
'
,
action
=
'
store_true
'
,
default
=
False
)
held_list_parser
.
add_argument
(
'
--field
'
,
dest
=
'
fields
'
,
action
=
'
append
'
,
default
=
None
)
held_approve_parser
=
held_subparsers
.
add_parser
(
'
approve
'
)
held_approve_parser
.
set_defaults
(
func
=
held_approve
)
...
...
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