mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Updated for return
This commit is contained in:
parent
d246d6beee
commit
af71f7c66e
1 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue