[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [policies/master] Many nicks weren't being matched by regex



commit fb6bc1de6b03fc9110b0375c46475a9dc7c666ec
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Thu Oct 5 12:10:48 2017 -0700

    Many nicks weren't being matched by regex
    
    Oops, mistakenly thought that included whitespace characters.
---
 scripts/irc_activity.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/irc_activity.py b/scripts/irc_activity.py
index 4b405ba..7545cfc 100644
--- a/scripts/irc_activity.py
+++ b/scripts/irc_activity.py
@@ -18,7 +18,7 @@ IRC_CHANNELS = (
   '#tor-internal',
 )
 
-AUTHOR = re.compile('^[0-9]{2}:[0-9]{2} <.(\S+)>')
+AUTHOR = re.compile('^[0-9]{2}:[0-9]{2} <[ .](\S+)>')
 DATE_LINE = re.compile('^--- Day changed [\S]{3} [\S]{3} [0-9]{2} [0-9]{4}$')
 START_DATE = datetime.date.today() - relativedelta.relativedelta(months = 6)
 LOG_DIR = sys.argv[1] if len(sys.argv) >= 2 else None
@@ -86,7 +86,7 @@ for channel in IRC_CHANNELS:
 
         continue  # prior to what we should take into consideration
 
-      m = AUTHOR.match(line)      
+      m = AUTHOR.match(line)
 
       if m:
         author = m.group(1)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits