[arch] fix -> crashing when information of a given package is not available

This commit is contained in:
Vinicius Moreira
2021-01-02 10:13:53 -03:00
parent 579ea91dcc
commit 4d0660e0ea
15 changed files with 53 additions and 19 deletions

View File

@@ -69,7 +69,7 @@ def get_info_list(pkg_name: str, remote: bool = False) -> List[tuple]:
return re.findall(r'(\w+\s?\w+)\s*:\s*(.+(\n\s+.+)*)', info)
def get_info_dict(pkg_name: str, remote: bool = False) -> dict:
def get_info_dict(pkg_name: str, remote: bool = False) -> Optional[dict]:
list_attrs = {'depends on', 'required by', 'conflicts with'}
info_list = get_info_list(pkg_name, remote)