aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-10-20 12:06:44 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-10-20 12:06:44 -0400
commit750286a7aba7dc091b4407c9f31157129aade588 (patch)
tree1df87be126a86d98b13b249c40e756782057a000
parent3a5ebbe9d91a44bd9a5107130e551b33bbf2d102 (diff)
downloadb4-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.py2
-rw-r--r--b4/ty.py6
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")')
diff --git a/b4/ty.py b/b4/ty.py
index b790007..874fa5e 100644
--- a/b4/ty.py
+++ b/b4/ty.py
@@ -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: