p-koo / tfomics

MIT License
3 stars 6 forks source link

tomtom fails silently #11

Open kaczmarj opened 2 years ago

kaczmarj commented 2 years ago

moana.tomtom fails silently if something goes wrong with the underlying tomtom command. the Popen object's return code should be checked for a non-zero value.

https://github.com/p-koo/tfomics/blob/3db5e7ae7fd379b3c1a26f693504e28d4e3dceb0/tfomics/moana.py#L213-L225

this fix should work, but i haven't tested it

process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 
stdout, stderr = process.communicate()    
if process.returncode != 0:
    print(stderr)
    raise RuntimeError("Something went wrong with tomtom. Please see stderr above.")
return stdout, stderr