mirror of https://git.48k.eu/ogclient
#1065 Use getattr when retrieving event socket
If ogClient does not run on windows or linux mode, it does not create a
datagram event socket.
If ogClient runs in virtual or live mode this will cause an error when
calling get_event_socket because the class instance has no member
"event_sock".
Use getattr when retrieving the event socket from ogClient class, if
there is no event socket, then return None.
Fixes 2465ef25b7
(Add event datagram socket)
more_events
parent
ecd735c9dc
commit
700aa89ea9
|
@ -48,7 +48,7 @@ class ogClient:
|
|||
return self.sock
|
||||
|
||||
def get_event_socket(self):
|
||||
return self.event_sock
|
||||
return getattr(self, 'event_sock', None)
|
||||
|
||||
def get_state(self):
|
||||
return self.state
|
||||
|
|
Loading…
Reference in New Issue