From e8e0da3896ca31071f975141aaf5dd59cc82f2db Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sat, 7 Nov 2015 10:09:57 -0500 Subject: [PATCH] Use only one regex to identify bots Two is wasteful. --- xonstat/views/submission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 0fa55de..12e1c65 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -521,7 +521,7 @@ def get_or_create_player(session=None, hashkey=None, nick=None): nick - nick of the player (in case of a first time create) """ # if we have a bot - if re.search('^bot#\d+$', hashkey) or re.search('^bot#\d+#', hashkey): + if re.search('^bot#\d+', hashkey): player = session.query(Player).filter_by(player_id=1).one() # if we have an untracked player elif re.search('^player#\d+$', hashkey): -- 2.39.2