Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
cope with uptime robot outage
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Jun 21, 2014
1 parent 109b3bd commit d4993b4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,13 @@ def get(self):

# Opened URLs are file-like.
full_url = '{0}?{1}'.format(ur_url, ur_query)
f = urllib2.urlopen(full_url)
raw_json = f.read()
try:
f = urllib2.urlopen(full_url)
raw_json = f.read()

except Exception as e:
print "Failed to retrieve stats.",
print "Uptime Robot may be down:", e

user = self.verify()
models_served = ModelServedCount.all().get()
Expand Down

0 comments on commit d4993b4

Please sign in to comment.