Skip to content

Commit

Permalink
Improved logging of edsc module
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Mar 12, 2015
1 parent b1b607d commit 4e76e18
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions misc/edsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,18 @@ def __init__(
if commander:
self.commander = commander

def __repr__(self):
return (
"StarSubmission("
"test={}, star=\"{}\", commander=\"{}\", refs={}"
")".format(
self.test,
self.name,
self.commander,
self.refs,
)
)


def add_distance(self, name, dist):
assert isinstance(name, str)
Expand Down Expand Up @@ -403,15 +415,15 @@ def submit(self):
)
resp = req.text
if not resp.startswith('{'):
edsc_log(self.apiCall, data, error=resp)
edsc_log(self.apiCall, repr(self), error=resp)
raise SubmissionError("Server Side Error: " + resp)

try:
respData = json.loads(resp)
except Exception:
edsc_log(self.apiCall, data, error=resp)
edsc_log(self.apiCall, repr(self), error=resp)
raise SubmissionError("Invalid server response: " + resp)
edsc_log(self.apiCall, data, respData)
edsc_log(self.apiCall, repr(self), respData)
try:
innerData = respData['d']
except KeyError:
Expand Down

0 comments on commit 4e76e18

Please sign in to comment.