Explorar el Código

Oops, actually fix the handling of mails without '@'.

Heikki Hokkanen hace 16 años
padre
commit
576f887d59
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      gitstats

+ 3
- 1
gitstats Ver fichero

@@ -240,7 +240,9 @@ class GitDataCollector(DataCollector):
240 240
 			author, mail = parts[4].split('<', 1)
241 241
 			author = author.rstrip()
242 242
 			mail = mail.rstrip('>')
243
-			domain = mail.rsplit('@', 1)[1]
243
+			domain = '?'
244
+			if mail.find('@') != -1:
245
+				domain = mail.rsplit('@', 1)[1]
244 246
 			date = datetime.datetime.fromtimestamp(float(stamp))
245 247
 
246 248
 			# First and last commit stamp