Commit 55b14320 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud
Browse files

vidjil_to_fasta.py: Catch exception at JSON loading

With malformed files, Fuse will raise an exception that must be caught here.
parent 5615c368
......@@ -72,8 +72,12 @@ if __name__ == '__main__':
used_names = {}
for vidjil in args.file:
data = fuse.ListWindows()
data.load(vidjil, "")
write_fuse_to_fasta(data, outfile, used_names, vidjil, args)
try:
data = fuse.ListWindows()
data.load(vidjil, "")
except Exception:
print "** Warning ** file %s could not be loaded" % vidjil
else:
write_fuse_to_fasta(data, outfile, used_names, vidjil, args)
outfile.close()
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