Skip to content

Commit

Permalink
Remove unused validate_address() (#1520)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje authored Apr 28, 2024
1 parent 514e479 commit f23927b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions bleak/backends/bluezdbus/utils.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# -*- coding: utf-8 -*-
import os
import re

from dbus_fast.auth import AuthExternal
from dbus_fast.constants import MessageType
from dbus_fast.message import Message

from ...exc import BleakError, BleakDBusError

_address_regex = re.compile("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$")


def assert_reply(reply: Message):
"""Checks that a D-Bus message is a valid reply.
Expand All @@ -23,10 +20,6 @@ def assert_reply(reply: Message):
assert reply.message_type == MessageType.METHOD_RETURN


def validate_address(address):
return _address_regex.match(address) is not None


def extract_service_handle_from_path(path):
try:
return int(path[-4:], 16)
Expand Down

0 comments on commit f23927b

Please sign in to comment.