Skip to content

Commit e9f38cd

Browse files
committed
mask: support comma separated bugs
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent a4520f8 commit e9f38cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pkgdev/scripts/pkgdev_mask.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@
6161
mask_opts.add_argument(
6262
"-b",
6363
"--bug",
64+
"--bugs",
6465
dest="bugs",
65-
action="append",
66-
type=arghparse.positive_int,
66+
action=arghparse.CommaSeparatedValuesAppend,
67+
default=[],
6768
help="reference bug in the mask comment",
6869
docs="""
6970
Add a reference to a bug in the mask comment. May be specified multiple
@@ -100,6 +101,8 @@ def _mask_validate(parser, namespace):
100101
atoms = set()
101102
maintainers = set()
102103

104+
namespace.bugs = list(map(int, dict.fromkeys(namespace.bugs)))
105+
103106
if not namespace.rites and namespace.file_bug:
104107
mask.error("bug filing requires last rites")
105108
if namespace.file_bug and not namespace.api_key:

0 commit comments

Comments
 (0)