diff --git a/main.py b/main.py index a627c86..0f98369 100644 --- a/main.py +++ b/main.py @@ -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()