1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 00:07:14 +03:00

Treat return code 5xx as successfully sent

This commit is contained in:
Jonathan Harris 2018-01-03 17:54:30 +00:00
parent 61aab83244
commit ba4809942a

View File

@ -295,7 +295,8 @@ def worker():
r.raise_for_status()
reply = r.json()
(msgnum, msg) = reply['msgnum'], reply['msg']
if msgnum // 100 != 1: # 1xx == OK
# 1xx = OK, 2xx = fatal error, 3&4xx not generated at top-level, 5xx = error but events saved for later processing
if msgnum // 100 == 2:
print('EDSM\t%s %s\t%s' % (msgnum, msg, json.dumps(pending, separators = (',', ': '))))
plug.show_error(_('Error: EDSM {MSG}').format(MSG=msg))
else: