mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
add try/except in newsblur.chart.py so a bad request doesn't break all the monitors
This commit is contained in:
parent
441dbe6b17
commit
0368bbcdb7
1 changed files with 5 additions and 2 deletions
|
@ -14,8 +14,11 @@ else:
|
|||
def call_monitor(endpoint):
|
||||
uri = MONITOR_URL + endpoint
|
||||
res = requests.get(uri, verify=verify)
|
||||
return res.json()
|
||||
|
||||
try:
|
||||
return res.json()
|
||||
except:
|
||||
return {}
|
||||
|
||||
class Service(SimpleService):
|
||||
def __init__(self, configuration=None, name=None):
|
||||
SimpleService.__init__(self, configuration=configuration, name=name)
|
||||
|
|
Loading…
Add table
Reference in a new issue