Skip to content

Commit

Permalink
feat: startswith to contains for tracker messages (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa authored Feb 19, 2024
1 parent 96fd4e4 commit e4a5143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qbtools/commands/tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e4a5143

Please sign in to comment.