This commit is contained in:
Guilhem Lavaux 2021-01-24 09:31:01 +01:00
parent 014f7f9564
commit cb9e97e2c1
3 changed files with 10 additions and 8 deletions

View file

@ -410,7 +410,7 @@ def loadGadget(str filename, int snapshot_id, int gadgetFormat = 1, bool loadPos
with nogil:
data = loadGadgetMulti(filename_bs, snapshot_id, flags, gadgetFormat)
if data == <SimuData*>0:
return None
raise RuntimeError("File could not be read")
return PySimulationAdaptor(wrap_simudata(data, flags))