Skip to content

Commit

Permalink
Make pyflakes happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski committed Nov 9, 2024
1 parent dc15043 commit 247c4d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/senaite/astm/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os

from senaite.astm import adapter_registry
from senaite.astm import adapters
from senaite.astm import logger
from senaite.astm.constants import ACK
from senaite.astm.constants import ENQ
Expand All @@ -25,7 +24,6 @@
DEFAULT_FORMAT = "json"



class ASTMProtocol(asyncio.Protocol):
"""ASTM Protocol
Expand Down Expand Up @@ -117,8 +115,9 @@ def data_received(self, data):
def handle_data(self, data):
"""Process incoming data
"""
# lookup custom adapter to handle the data
adapter = adapter_registry.queryMultiAdapter((self, data), IDataHandler)
# lookup custom multi-adapter to handle the data
adapter = adapter_registry.queryMultiAdapter(
(self, data), IDataHandler)
if adapter and adapter.can_handle():
return adapter.handle_data()

Expand Down

0 comments on commit 247c4d9

Please sign in to comment.