Skip to content

Commit 364ada7

Browse files
committed
Fix build
1 parent f15f3fd commit 364ada7

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

dev_tools/src/d1_dev/setup-all.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@
5050
# 'csw',
5151
]
5252

53-
5453
log = logging.getLogger(__name__)
55-
54+
logging.basicConfig(level=logging.DEBUG)
5655

5756
def main():
5857
if sys.version_info[0] != 3:

lib_client/src/d1_client/baseclient_1_1.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,10 @@ def query(
101101
response = self.queryResponse(
102102
queryEngine, query_str, vendorSpecific, do_post, **kwargs
103103
)
104-
try:
104+
if self._content_type_is_json(response):
105105
return self._read_json_response(response)
106-
except d1_common.types.exceptions.DataONEException:
107-
pass
108-
try:
109-
return response.json()
110-
except Exception:
111-
pass
112-
try:
113-
return json.loads(response.text)
114-
except Exception:
115-
pass
116-
return self._read_stream_response(response)
106+
else:
107+
return self._read_stream_response(response)
117108

118109
def getQueryEngineDescriptionResponse(
119110
self, queryEngine, vendorSpecific=None, **kwargs

0 commit comments

Comments
 (0)