Skip to content
Snippets Groups Projects

Fix bugs in old HTTP API

Merged Duncan Macleod requested to merge duncanmmacleod/gwdatafind:fix-http-api into main
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -91,6 +91,8 @@ class HTTPConnection(http_client.HTTPConnection):
RuntimeError
if query is unsuccessful
"""
if not url.startswith("/"): # ensure all URLs start with a slash
url = f"/{url}"
self.request(method, url, **kwargs)
response = self.getresponse()
if response.status != 200:
@@ -272,8 +274,8 @@ class HTTPConnection(http_client.HTTPConnection):
path = api.find_times_path(
site,
frametype,
gpsstart or 1,
gpsend or 2e9,
gpsstart or int(1),
gpsend or int(2e9),
)
segmentlist = self.get_json(path)
return segments.segmentlist(map(segments.segment, segmentlist))
Loading