Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugin-dput
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
obs
osc-plugin-dput
Commits
bf00d509
Unverified
Commit
bf00d509
authored
1 year ago
by
Andrej Shadura
Browse files
Options
Downloads
Patches
Plain Diff
Emulate get_cmd_help missing from osc 1.x
Signed-off-by:
Andrej Shadura
<
andrew.shadura@collabora.co.uk
>
parent
19f09032
No related branches found
No related tags found
No related merge requests found
Pipeline
#98134
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dput.py
+11
-0
11 additions, 0 deletions
dput.py
with
11 additions
and
0 deletions
dput.py
+
11
−
0
View file @
bf00d509
...
@@ -35,4 +35,15 @@ def do_dput(self, subcmd, opts, *args):
...
@@ -35,4 +35,15 @@ def do_dput(self, subcmd, opts, *args):
if
hasattr
(
self
,
"
osc_plugin_dput
"
):
if
hasattr
(
self
,
"
osc_plugin_dput
"
):
osc_plugin_dput
=
self
.
osc_plugin_dput
# noqa: F811
osc_plugin_dput
=
self
.
osc_plugin_dput
# noqa: F811
# osc 1.x removes get_cmd_help, inject a replacement
if
not
hasattr
(
self
,
"
get_cmd_help
"
):
def
format_help
(
subcmd
,
opts
=
None
,
*
args
):
for
action
in
self
.
argparser
.
_actions
:
if
not
isinstance
(
action
,
argparse
.
_SubParsersAction
):
continue
for
choice
,
subparser
in
action
.
choices
.
items
():
if
choice
==
subcmd
:
return
subparser
.
format_help
()
self
.
get_cmd_help
=
format_help
osc_plugin_dput
.
do_dput
(
self
,
subcmd
,
opts
,
*
args
)
osc_plugin_dput
.
do_dput
(
self
,
subcmd
,
opts
,
*
args
)
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