Commit 0a301057 authored by karpov-sv's avatar karpov-sv
Browse files

Do not crash if SExtractor did not return the requested checkimage.

It is anyway bad as it means the code is run incorrectly or SExtractor failed, but at least we should not add our own crash on top of that!
parent 193ffba3
......@@ -383,7 +383,11 @@ def get_objects_sextractor(image, header=None, mask=None, err=None, thresh=2.0,
result = [result]
for name in checknames:
if os.path.exists(name):
result.append(fits.getdata(name))
else:
log("Cannot find requested output checkimage file", name)
result.append(None)
if _workdir is None:
shutil.rmtree(workdir)
......
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