Skip to content

Commit

Permalink
Try to show more meaningful output from submit-distances
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Jan 23, 2015
1 parent 0fce6e9 commit 19b6c43
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions submit-distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import sys
import tradedb

from misc.edsc import StarSubmission
from misc.edsc import StarSubmission, annotate_submission_response
from tkinter import Tk

try:
Expand Down Expand Up @@ -354,13 +354,16 @@ def main():
)
resp = sub.submit()

status = resp['status']['input'][0]['status']
if status['statusnum'] == 0:
print(status['msg'])
else:
print("ERROR: {} ({})".format(
status['msg'], status['statusnum'],
))
try:
annotate_submission_response(resp)
except:
status = resp['status']['input'][0]['status']
if status['statusnum'] == 0:
print(status['msg'])
else:
print("ERROR: {} ({})".format(
status['msg'], status['statusnum'],
))


if __name__ == "__main__":
Expand Down

0 comments on commit 19b6c43

Please sign in to comment.