Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on the morning of Tuesday 11th August 2020, starting at approximately 9am PDT. It is expected to take around 20 minutes and there will be a short period of downtime (less than five minutes) towards the end of the maintenance window. Please direct any comments, questions, or concerns to computing-help@ligo.org.

Adding response status to FakeResponse

parent dd0ae853
......@@ -125,7 +125,9 @@ class ProxyHTTPSConnection(ProxyHTTPConnection):
# Hacky fake response type for kludging response object
# Has json() and read() methods
class FakeResponse(object):
def __init__(self, json, *args, **kwargs): self._data = json
def __init__(self, json, status, *args, **kwargs):
self._data = json
self.status = status
def json(self): return self._data
def read(self): return json.dumps(self._data)
......@@ -1633,7 +1635,7 @@ class GraceDb(GsiRest):
file_text = self.files(object_id, r_json['filename']).read()
r_json[u'text'] = file_text.decode()
response = FakeResponse(r_json)
response = FakeResponse(r_json, response.status)
# Return response
return response
......@@ -1742,7 +1744,7 @@ class GraceDb(GsiRest):
file_text = self.files(object_id, r_json['filename']).read()
r_json[u'text'] = file_text.decode()
response = FakeResponse(r_json)
response = FakeResponse(r_json, response.status)
return response
......
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