api: Cut down a bit on the error handling verbosity.
(imported from commit b665b939f8474f0d631125ecd7c3d300e338ff3c)
This commit is contained in:
parent
8f1a418fd0
commit
2e2c296899
|
@ -42,14 +42,16 @@ class HumbugAPI():
|
||||||
# 502/503 typically means the server was restarted; sleep
|
# 502/503 typically means the server was restarted; sleep
|
||||||
# a bit, then try again
|
# a bit, then try again
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print "HTTP Error getting zephyrs; trying again soon."
|
|
||||||
print e
|
print e
|
||||||
print traceback.format_exc()
|
print "Error getting zephyrs (probably server restart); retrying..."
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
# For other errors, just try again
|
# For other errors, just try again
|
||||||
|
if self.verbose:
|
||||||
print e
|
print e
|
||||||
|
print traceback.format_exc()
|
||||||
|
print "Unexpected error! You should send Tim the above traceback. Retrying..."
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
continue
|
continue
|
||||||
for message in sorted(messages, key=lambda x: x["id"]):
|
for message in sorted(messages, key=lambda x: x["id"]):
|
||||||
|
|
Loading…
Reference in a new issue