mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(demo): don't crash generator if upstream isn't ready
This commit is contained in:
@@ -47,7 +47,10 @@ def jsonGetRequest(uri):
|
||||
def jsonPostRequest(uri, data):
|
||||
req = urllib2.Request(uri)
|
||||
req.add_header("Content-Type", "application/json")
|
||||
response = urllib2.urlopen(req, json.dumps(data))
|
||||
try:
|
||||
response = urllib2.urlopen(req, json.dumps(data))
|
||||
except Exception as e:
|
||||
print("Request to '%s' failed: %s" % (uri, e))
|
||||
|
||||
|
||||
def addSilence(matchers, startsAt, endsAt, createdBy, comment):
|
||||
|
||||
Reference in New Issue
Block a user