From c52a48fec38cef4ad513c6cfa64579a8f057a0aa Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 7 Mar 2021 15:08:26 +0100 Subject: getstats.py: count *.py files, too --- NEWS | 1 + dist-tools/getstats.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 89357f8d..773107e7 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,7 @@ fetchmail-6.4.17 (not yet released): # BUG FIXES * IMAP client: it used to leak memory for username and password when trying the LOGIN (password-based) authentication and encountered a timeout situation. +* dist-tools/getstats.py: also counts lines in *.py files, shown above. # CHANGES * fetchmail.man: now mentions that you may need to add --ssl when specifying diff --git a/dist-tools/getstats.py b/dist-tools/getstats.py index 4586e361..ad52f464 100755 --- a/dist-tools/getstats.py +++ b/dist-tools/getstats.py @@ -12,7 +12,7 @@ from datetime import date # Get version and date with tempfile.TemporaryDirectory() as tmpdirname: subprocess.check_call("git archive --format=tar HEAD | ( cd {} && tar -xf -)".format(tmpdirname), shell=True) - LOC = subprocess.getoutput("cat {}/*.[chly] 2>/dev/null | wc -l".format(tmpdirname)).strip() + LOC = subprocess.getoutput("cat {0}/*.[chly] {0}/*.py 2>/dev/null | wc -l".format(tmpdirname)).strip() try: with open("configure.ac") as f: AC_INIT = list(filter(lambda x: re.match('AC_INIT', x), -- cgit v1.2.3