Skip to content

Download.rvcurve creates file if object not found #63

@cgelino

Description

@cgelino

If you try to download an RV curve for an object that doesn't have an RV curve, Download.rvcurve will save a file with the input object name and the status returned by the call will be "ok'. Example:

from hiresprv.download import Download
data = Download('prv.cookies', './')
rtn = data.rvcurve('garbage')
print(rtn)

{'status': 'ok', 'msg': ''}

A file named vstgarbage.csv is created on disk. This file contains {"status":"Failed to open requested file vstgarbage.csv in your workspace."}. It would be much more useful to have Download.rvcurve return {'status':'Failed', 'msg':'Failed to open requested file vstgarbage.csv in your workspace.'} in this case and for no file to be written out. The documentation for rvcurve says that objname must match an entry in TARGET column, but clearly it will happily process any name you give it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions