Merge pull request #812 from soykan/patch-1

Small bug fix on todo module.
This commit is contained in:
tobi-wan-kenobi 2021-08-14 19:28:08 +02:00 committed by GitHub
commit 27194a92c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,11 +40,12 @@ class Module(core.module.Module):
def count_items(self):
try:
i = -1
i = 0
with open(self.__doc) as f:
for i, l in enumerate(f):
pass
return i + 1
for l in f.readlines():
if l.strip() != '':
i += 1
return i
except Exception:
return 0