Commit a7589584 authored by Mikaël Salson's avatar Mikaël Salson

buildBrowserGermline.py: Deal with missing files

If a file from the germlines.data doesn't exist in the current directory,
complain about it but provide a possible solution.

Reraising an exception was done following martineau's advices (see
http://stackoverflow.com/a/6062799).
parent be4e0508
......@@ -35,7 +35,14 @@ sequence = ""
germline_files = get_required_files(data_file)
for current_file in germline_files:
fasta = open(current_file, "r")
try:
fasta = open(current_file, "r")
except IOError as e:
raise type(e),\
type(e)(str(e) + '\nDid you forget to run ``make\'\' in the germline directory?\n'\
+'Otherwise, please tell us about the problem at contact@vidjil.org'),\
sys.exc_info()[2]
system = current_file.split('/')[-1].split('.')[0]
table[system] = {}
......
Markdown is supported
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