瀏覽代碼

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

Heikki Hokkanen 16 年之前
父節點
當前提交
576f887d59
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      gitstats

+ 3
- 1
gitstats 查看文件

@@ -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