Skip to content

Commit

Permalink
Clean up if staatement and organize import statement
Browse files Browse the repository at this point in the history
  • Loading branch information
r-dailey authored Mar 19, 2024
1 parent 1d0142e commit 4c589c9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lisa/tools/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if TYPE_CHECKING:
from lisa.node import Node

from lisa.operating_system import Posix, BSD
from lisa.operating_system import BSD, Posix
from lisa.tools.mkdir import Mkdir
from lisa.util import UnsupportedDistroException, get_matched_str

Expand Down Expand Up @@ -54,11 +54,10 @@ def dependencies(self) -> List[Type[Tool]]:

def _install(self) -> bool:
package_name = "python3-pip"
assert isinstance(self.node.os, Posix)
if isinstance(self.node.os, BSD):
self.node.os.install_packages("py39-pip")
else:
self.node.os.install_packages(package_name)
package_name = "py39-pip"
assert isinstance(self.node.os, Posix)
self.node.os.install_packages(package_name)
return self._check_exists()

def install_packages(self, packages_name: str, install_path: str = "") -> None:
Expand Down

0 comments on commit 4c589c9

Please sign in to comment.