Skip to content

Commit

Permalink
dhcp: fix linter, more TimeoutError fixes (?) for older pythons
Browse files Browse the repository at this point in the history
  • Loading branch information
etene committed Feb 5, 2025
1 parent cae84a2 commit a50a02c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyroute2/dhcp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ async def wait_for_state(
'''Waits until the client is in the target state.'''
try:
await asyncio.wait_for(self._states[state].wait(), timeout=timeout)
except TimeoutError as err:
raise TimeoutError(
except asyncio.exceptions.TimeoutError as err:
raise asyncio.exceptions.TimeoutError(
f'Timed out waiting for the {state.name} state. '
f'Current state: {self.state.name}'
) from err
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linux/test_dhcp/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from ipaddress import IPv4Address
import os
from ipaddress import IPv4Address
from pathlib import Path

import pytest
Expand Down

0 comments on commit a50a02c

Please sign in to comment.