Skip to content

Commit 955ee9f

Browse files
committed
Simplify plumbum usage in update_wiki
1 parent 449ed28 commit 955ee9f

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

wiki/update_wiki.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,16 @@ def calculate_monthly_stat(
4646
images = year_month_file.content.count("Build manifest")
4747

4848
with plumbum.local.env(TZ="UTC"):
49-
future = (
50-
git[
51-
"log",
52-
"--oneline",
53-
"--since",
54-
f"{year_month_date}.midnight",
55-
"--until",
56-
f"{year_month_date + relativedelta.relativedelta(months=1)}.midnight",
57-
"--first-parent",
58-
]
59-
& plumbum.BG
60-
)
61-
future.wait()
62-
commits = len(future.stdout.splitlines())
63-
49+
git_log = git[
50+
"log",
51+
"--oneline",
52+
"--since",
53+
f"{year_month_date}.midnight",
54+
"--until",
55+
f"{year_month_date + relativedelta.relativedelta(months=1)}.midnight",
56+
"--first-parent",
57+
]()
58+
commits = len(git_log.splitlines())
6459
return Statistics(builds=builds, images=images, commits=commits)
6560

6661

0 commit comments

Comments
 (0)