Skip to content

Commit cf5907c

Browse files
authored
To support subdirs in bucket folder
See ScoopInstaller/Scoop#5119
1 parent 407b770 commit cf5907c

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

maintenance/github-crawler.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from __future__ import print_function
66

77
import copy
8+
import glob
89
import io
910
import json
1011
import os
@@ -505,13 +506,7 @@ def do_repo(repo, i, num_repos, do_score=True):
505506
jsons = 0
506507
good_jsons = 0
507508
malformed = 0
508-
for f in os.listdir(bucket_path):
509-
file_path = os.path.join(bucket_path, f)
510-
if not os.path.isfile(file_path):
511-
continue
512-
if os.path.splitext(file_path)[1] != ".json":
513-
continue
514-
509+
for f in glob.iglob(bucket_path + '**/*.json', recursive=True):
515510
jsons += 1
516511
row = {}
517512
for key in keys:

0 commit comments

Comments
 (0)