Check for unfilled SBS1 message before sending.
This commit is contained in:
parent
13c98cada7
commit
0a1c49f1fc
@ -64,8 +64,9 @@ class modes_output_sbs1(modes_parse.modes_parse):
|
|||||||
def output(self, msg):
|
def output(self, msg):
|
||||||
try:
|
try:
|
||||||
sbs1_msg = self.parse(msg)
|
sbs1_msg = self.parse(msg)
|
||||||
for conn in self._conns[:]: #iterate over a copy of the list
|
if sbs1_msg is not None:
|
||||||
conn.send(sbs1_msg)
|
for conn in self._conns[:]: #iterate over a copy of the list
|
||||||
|
conn.send(sbs1_msg)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
self._conns.remove(conn)
|
self._conns.remove(conn)
|
||||||
print "Connections: ", len(self._conns)
|
print "Connections: ", len(self._conns)
|
||||||
|
Loading…
Reference in New Issue
Block a user