Skip to content

Commit 21e093a

Browse files
committed
Slightly better module popularity counter
Signed-off-by: Tod Beardsley <[email protected]>
1 parent 04a6185 commit 21e093a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/modules/module_commits.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def check_commit_history(fname)
5959
@module_stats = []
6060

6161
Find.find(dir) do |fname|
62-
next unless fname =~ /rb$/
62+
next unless fname =~ /\.(rb|py)$/ # be either ruby or python
63+
next unless File.file?(fname) && File.readable?(fname)
6364
@module_stats << check_commit_history(fname)
6465
end
6566

0 commit comments

Comments
 (0)