Updated for return

This commit is contained in:
Dimitris Zlatanidis 2024-03-15 20:41:27 +02:00
parent d246d6beee
commit af71f7c66e

View file

@ -1,5 +1,6 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from __future__ import annotations
import os
import re
@ -31,11 +32,11 @@ class Utilities(Configs):
def is_package_installed(self, name: str) -> str:
""" Returns the installed package binary. """
installed_package: Generator = Path(self.log_packages).glob(f'{name}{self.file_pattern}')
installed_package: Generator = self.log_packages.glob(f'{name}{self.file_pattern}')
for installed in installed_package:
inst_name: str = self.split_package(installed.name)['name']
if inst_name == name:
return installed
return installed.name
return ''
def all_installed(self) -> dict: