浏览代码

Remove "total_authors = 0" fallback.

When counting authors, do not fall back to 0 if the git call fails. Zero
authors causes ZeroDivisionError later on otherwise. This reverts an old change
for msysgit on win32, introduced in a01045f2480a21f28dd90e278b4f560020a97b9e.
It should no longer be necessary.
Heikki Hokkanen 13 年前
父节点
当前提交
496228fb74
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1
    4
      gitstats

+ 1
- 4
gitstats 查看文件

248
 	def collect(self, dir):
248
 	def collect(self, dir):
249
 		DataCollector.collect(self, dir)
249
 		DataCollector.collect(self, dir)
250
 
250
 
251
-		try:
252
-			self.total_authors += int(getpipeoutput(['git shortlog -s %s' % getcommitrange(), 'wc -l']))
253
-		except:
254
-			self.total_authors = 0
251
+		self.total_authors += int(getpipeoutput(['git shortlog -s %s' % getcommitrange(), 'wc -l']))
255
 		#self.total_lines = int(getoutput('git-ls-files -z |xargs -0 cat |wc -l'))
252
 		#self.total_lines = int(getoutput('git-ls-files -z |xargs -0 cat |wc -l'))
256
 
253
 
257
 		# tags
254
 		# tags