Commit e55451c9 authored by Jim Newsome's avatar Jim Newsome
Browse files

TorNet: conditionally import by python version

This fixes checking on recent versions of mypy, which understands
explicit version checks like this.
parent 5e7f3eef
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -53,10 +53,10 @@ from chutney.Util import (
from chutney.network_tests import NetworkTestFailure
from collections.abc import Collection

try:
if sys.version_info >= (3, 11):
    # Added in Python 3.11
    from importlib.resources.abc import Traversable
except ImportError:
else:
    # Deprecated since Python 3.12
    from importlib.abc import Traversable
from typeguard import check_type