From e4a5143b11979a1da9daea5ffe15e2f8b5ba8423 Mon Sep 17 00:00:00 2001 From: Steven Kreitzer Date: Mon, 19 Feb 2024 14:26:35 -0600 Subject: [PATCH] feat: startswith to contains for tracker messages (#43) --- qbtools/commands/tagging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qbtools/commands/tagging.py b/qbtools/commands/tagging.py index 719de72..d3f3f79 100755 --- a/qbtools/commands/tagging.py +++ b/qbtools/commands/tagging.py @@ -123,8 +123,8 @@ def __init__(args, logger): working = len(list(filter(lambda s: s.status == 2, t.trackers))) > 0 if (args.unregistered or args.tracker_down or args.not_working) and not working: - unregistered_matched = any(z.msg.lower().startswith(x.lower()) for x in UNREGISTERED_MATCHES for z in filtered_trackers) - maintenance_matched = any(z.msg.lower().startswith(x.lower()) for x in MAINTENANCE_MATCHES for z in filtered_trackers) + unregistered_matched = any(x.lower() in z.msg.lower() for x in UNREGISTERED_MATCHES for z in filtered_trackers) + maintenance_matched = any(x.lower() in z.msg.lower() for x in MAINTENANCE_MATCHES for z in filtered_trackers) if args.unregistered and unregistered_matched: tags_to_add.append('unregistered') elif args.tracker_down and maintenance_matched: