summaryrefslogtreecommitdiff
path: root/worker
diff options
context:
space:
mode:
authorBoYanZh <32470225+BoYanZh@users.noreply.github.com>2020-10-05 14:34:06 +0800
committerBoYanZh <32470225+BoYanZh@users.noreply.github.com>2020-10-05 14:34:06 +0800
commitce8646c5117547a78fd87b8d413ee2031caf6536 (patch)
tree2417848a5cf4eeb897a918c026cecc77e0f6fcca /worker
parent0acad81ed4954e53cff66f020d90dc1741e92ed0 (diff)
update: permit .gitignore files
Diffstat (limited to 'worker')
-rw-r--r--worker/GitWorker.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/worker/GitWorker.py b/worker/GitWorker.py
index fd52853..0d49313 100644
--- a/worker/GitWorker.py
+++ b/worker/GitWorker.py
@@ -94,9 +94,9 @@ class GitWorker():
if not tidy: continue
dirList = list(
filter(
- lambda x: x not in [
- ".git", *[f"h{n}" for n in range(20)]
- ] and not GitWorker.isREADME(x), os.listdir(repoDir)))
+ lambda x: x not in
+ [".gitignore", ".git", *[f"h{n}" for n in range(20)]
+ ] and not GitWorker.isREADME(x), os.listdir(repoDir)))
if dirList:
self.logger.warning(
f"{repoName} {stuID} {stuName} untidy {', '.join(dirList)}"
@@ -183,8 +183,9 @@ class GitWorker():
dirList = os.listdir(repoDir)
dirList = list(
filter(
- lambda x: x not in [".git", *[f"h{n}" for n in range(20)]] and
- not GitWorker.isREADME(x), dirList))
+ lambda x: x not in [
+ ".gitignore", ".git", *[f"h{n}" for n in range(20)]
+ ] and not GitWorker.isREADME(x), dirList))
if dirList:
self.logger.warning(f"{repoName} untidy {', '.join(dirList)}")
for _, stuName in self.hgroups[repoName]:
@@ -258,7 +259,7 @@ class GitWorker():
with multiprocessing.Pool(self.processCount) as p:
res = p.starmap(self.checkIndvProcess,
[(i, hwNum)
- for i in range(len(self.hgroups.keys()))])
+ for i in range(len(self.hgroups.keys()))])
else:
res = [self.checkIndvProcess(self.args.rejudge, hwNum)]
return {k: v for d in res for k, v in d.items()}