Skip to content

DataQualityFlag.query not selecting between segdb/dqsegdb correctly

The DataQualityFlag.query method isn't picking between query_dqsegdb and query_segdb correctly, the logic for selection isn't very good:

https://github.com/gwpy/gwpy/blob/c5a7ddf217bbd6b039e6bda96b3ff09a623ac4d0/gwpy/segments/flag.py#L397-L401

This means that a number of URLs aren't being resolved properly. I think we can basically change this to

if url.startswith('geosegdb'):
    return query_segdb
return query_dqsegdb(...)

or similar since GEO is the only old-style server remaining.