Fix all ruff lint errors across decnet/, templates/, and tests/
Some checks failed
CI / Test (pytest) (3.11) (push) Has been cancelled
CI / Test (pytest) (3.12) (push) Has been cancelled
Security / SAST (bandit) (push) Has been cancelled
Security / Dependency audit (pip-audit) (push) Has been cancelled
CI / Lint (ruff) (push) Has been cancelled
Some checks failed
CI / Test (pytest) (3.11) (push) Has been cancelled
CI / Test (pytest) (3.12) (push) Has been cancelled
Security / SAST (bandit) (push) Has been cancelled
Security / Dependency audit (pip-audit) (push) Has been cancelled
CI / Lint (ruff) (push) Has been cancelled
This commit is contained in:
@@ -7,11 +7,8 @@ interactions as JSON.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import os
|
||||
import socket
|
||||
import struct
|
||||
from datetime import datetime, timezone
|
||||
from decnet_logging import syslog_line, write_syslog_file, forward_syslog
|
||||
|
||||
NODE_NAME = os.environ.get("NODE_NAME", "mqtt-broker")
|
||||
@@ -48,11 +45,13 @@ def _parse_connect(payload: bytes):
|
||||
# Protocol level (1 byte)
|
||||
if pos >= len(payload):
|
||||
return {}, pos
|
||||
_proto_level = payload[pos]; pos += 1
|
||||
_proto_level = payload[pos]
|
||||
pos += 1
|
||||
# Connect flags (1 byte)
|
||||
if pos >= len(payload):
|
||||
return {}, pos
|
||||
flags = payload[pos]; pos += 1
|
||||
flags = payload[pos]
|
||||
pos += 1
|
||||
# Keep alive (2 bytes)
|
||||
pos += 2
|
||||
# Client ID
|
||||
|
||||
Reference in New Issue
Block a user