Commit 2a078a20 authored by Eric CHARPENTIER's avatar Eric CHARPENTIER 🐍
Browse files

fixed bug when no annot file has been created while creating report

parent 8c9ca764
......@@ -11,10 +11,14 @@ from jinja2 import Environment, FileSystemLoader
# Functions
def file_len(fname):
with open(fname) as f:
for i, l in enumerate(f):
pass
return i + 1
try:
with open(fname) as f:
for i, l in enumerate(f):
pass
return i + 1
except FileNotFoundError:
return 0
# Parser
argParser = argparse.ArgumentParser()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment