Skip to content

Commit

Permalink
[nrf fromtree] twister: Fix TypeError at get_installed_packages
Browse files Browse the repository at this point in the history
Fix confusing `TypeError: 'type' object is not subscriptable`
at _get_installed_packages() if twister runs on python version < 3.9

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
(cherry picked from commit b8bed5b)
  • Loading branch information
golowanow authored and rlubos committed Sep 2, 2024
1 parent fba7ded commit af17fd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/pylib/twister/twisterlib/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from datetime import datetime, timezone
from importlib import metadata
from pathlib import Path
from typing import Generator
from typing import Generator, List

from twisterlib.coverage import supported_coverage_formats

Expand Down Expand Up @@ -49,7 +49,7 @@ def _get_installed_packages() -> Generator[str, None, None]:
yield dist.metadata['Name']


installed_packages: list[str] = list(_get_installed_packages())
installed_packages: List[str] = list(_get_installed_packages())
PYTEST_PLUGIN_INSTALLED = 'pytest-twister-harness' in installed_packages


Expand Down

0 comments on commit af17fd8

Please sign in to comment.