Changeset View
Changeset View
Standalone View
Standalone View
swh/graph/client.py
Show All 10 Lines | |||||
class GraphAPIError(Exception): | class GraphAPIError(Exception): | ||||
"""Graph API Error""" | """Graph API Error""" | ||||
def __str__(self): | def __str__(self): | ||||
return "An unexpected error occurred in the Graph backend: {}".format(self.args) | return "An unexpected error occurred in the Graph backend: {}".format(self.args) | ||||
class GraphArgumentException(Exception): | class GraphArgumentException(Exception): | ||||
def __init__(self, *args, response): | def __init__(self, *args, response=None): | ||||
super().__init__(*args) | super().__init__(*args) | ||||
self.response = response | self.response = response | ||||
class RemoteGraphClient(RPCClient): | class RemoteGraphClient(RPCClient): | ||||
"""Client to the Software Heritage Graph.""" | """Client to the Software Heritage Graph.""" | ||||
def __init__(self, url, timeout=None): | def __init__(self, url, timeout=None): | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |