diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-10-20 12:06:44 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-10-20 12:06:44 -0400 |
commit | 750286a7aba7dc091b4407c9f31157129aade588 (patch) | |
tree | 1df87be126a86d98b13b249c40e756782057a000 | |
parent | 3a5ebbe9d91a44bd9a5107130e551b33bbf2d102 (diff) | |
download | b4-750286a7aba7dc091b4407c9f31157129aade588.tar.gz |
ty: fix bugs introduced when switching -s to -t
Test out and fix the bugs introduced by switching flags.
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/command.py | 2 | ||||
-rw-r--r-- | b4/ty.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/b4/command.py b/b4/command.py index 9199359..ef5af58 100644 --- a/b4/command.py +++ b/b4/command.py @@ -201,7 +201,7 @@ def cmd(): help='Write thanks files into this dir (default=.)') sp_ty.add_argument('-l', '--list', action='store_true', default=False, help='List pull requests and patch series you have retrieved') - sp_ty.add_argument('-t', '--thank-for', default=None, + sp_ty.add_argument('-t', '--thank-for', dest='thankfor', default=None, help='Generate thankyous for specific entries from -l (e.g.: 1,3-5,7-; or "all")') sp_ty.add_argument('-d', '--discard', default=None, help='Discard specific messages from -l (e.g.: 1,3-5,7-; or "all")') @@ -509,11 +509,11 @@ def thank_selected(cmdargs): logger.info('Nothing to do') sys.exit(0) - if cmdargs.send == 'all': + if cmdargs.thankfor == 'all': listing = tracked else: listing = list() - for num in b4.parse_int_range(cmdargs.send, upper=len(tracked)): + for num in b4.parse_int_range(cmdargs.thankfor, upper=len(tracked)): try: index = int(num) - 1 listing.append(tracked[index]) @@ -659,7 +659,7 @@ def main(cmdargs): if cmdargs.auto: check_stale_thanks(cmdargs.outdir) auto_thankanator(cmdargs) - elif cmdargs.thank: + elif cmdargs.thankfor: check_stale_thanks(cmdargs.outdir) thank_selected(cmdargs) elif cmdargs.discard: |