Loading csst_dfs_client/common/request.py +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ def request_error_handler_decorator(func): def wrapper(*args, **kwargs): try: result = func(*args, **kwargs) if result.headers['content-type'] == "application/octet-stream": if 'content-type' in result.headers and result.headers['content-type'] == "application/octet-stream": return result return Result.from_response(result) except requests.exceptions.ConnectionError as e: Loading Loading
csst_dfs_client/common/request.py +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ def request_error_handler_decorator(func): def wrapper(*args, **kwargs): try: result = func(*args, **kwargs) if result.headers['content-type'] == "application/octet-stream": if 'content-type' in result.headers and result.headers['content-type'] == "application/octet-stream": return result return Result.from_response(result) except requests.exceptions.ConnectionError as e: Loading