We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d83b25e commit 67fa739Copy full SHA for 67fa739
1 file changed
app/contacts/contact_tcp.py
@@ -16,7 +16,9 @@ def __init__(self, services):
16
self.description = 'Accept beacons through a raw TCP socket'
17
self.log = self.create_logger('contact_tcp')
18
self.contact_svc = services.get('contact_svc')
19
- self.tcp_handler = TcpSessionHandler(services, self.log)
+ # Ensure services is always a mapping to avoid AttributeError when tests pass None
20
+ self.services = services or {}
21
+ self.tcp_handler = TcpSessionHandler(self.services, self.log)
22
23
async def start(self):
24
loop = asyncio.get_event_loop()
0 commit comments