Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lendingbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import time
import traceback
from httplib import BadStatusLine

from decimal import Decimal

Expand Down Expand Up @@ -94,6 +95,8 @@
exit(1)
elif 'timed out' in ex.message:
print "Timed out, will retry in " + str(Lending.get_sleep_time()) + "sec"
elif isinstance(ex, BadStatusLine):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it go as a except BadStatusLine:?

@rnevet rnevet Feb 21, 2017

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could, but then we would need to duplicate the entire error logic that is in except Exception: already. (i.e. logging, status persisting, sleep)

print "Caught BadStatusLine exception from Poloniex, ignoring."
else:
print traceback.format_exc()
print "Unhandled error, please open a Github issue so we can fix it!"
Expand Down