do not crash when a conenction can not be done
This commit is contained in:
@ -263,8 +263,11 @@ class EventStream:
|
||||
if not isinstance(stream, Stream):
|
||||
for streamcls, uri, kwargs in stream.events():
|
||||
if uri not in self.streams:
|
||||
print('add stream', uri, kwargs)
|
||||
self.streams[uri] = streamcls(uri, **kwargs)
|
||||
try:
|
||||
self.streams[uri] = streamcls(uri, **kwargs)
|
||||
print('added stream', uri, kwargs)
|
||||
except Exception as e:
|
||||
print('can not connect to', uri, repr(e))
|
||||
for name, stream in self.streams.items():
|
||||
try:
|
||||
if stream.get_events(events, maxevents):
|
||||
|
Reference in New Issue
Block a user