Skip to content

Commit bb724ed

Browse files
committed
bugs: --api-key is now required
Resolves: #217 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent b1626a9 commit bb724ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/pkgdev/scripts/argparsers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ def _determine_git_repo(parser, namespace):
4848

4949
class BugzillaApiKey:
5050
@classmethod
51-
def mangle_argparser(cls, parser):
51+
def mangle_argparser(cls, parser, required=False):
5252
parser.add_argument(
5353
"--api-key",
5454
metavar="TOKEN",
5555
help="Bugzilla API key",
56+
required=required,
5657
docs="""
5758
The Bugzilla API key to use for authentication. WARNING: using this
5859
option will expose your API key to other users of the same system.

src/pkgdev/scripts/pkgdev_bugs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
quiet=False,
4747
parents=(cwd_repo_argparser,),
4848
)
49-
BugzillaApiKey.mangle_argparser(bugs)
49+
BugzillaApiKey.mangle_argparser(bugs, required=True)
5050
bugs.add_argument(
5151
"targets",
5252
metavar="target",

0 commit comments

Comments
 (0)