Merge pull request #812 from soykan/patch-1
Small bug fix on todo module.
This commit is contained in:
commit
27194a92c8
1 changed files with 5 additions and 4 deletions
|
@ -40,11 +40,12 @@ class Module(core.module.Module):
|
||||||
|
|
||||||
def count_items(self):
|
def count_items(self):
|
||||||
try:
|
try:
|
||||||
i = -1
|
i = 0
|
||||||
with open(self.__doc) as f:
|
with open(self.__doc) as f:
|
||||||
for i, l in enumerate(f):
|
for l in f.readlines():
|
||||||
pass
|
if l.strip() != '':
|
||||||
return i + 1
|
i += 1
|
||||||
|
return i
|
||||||
except Exception:
|
except Exception:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue