diff --git a/slpkg/update_repository.py b/slpkg/update_repository.py index e0fe24d4..526e7566 100644 --- a/slpkg/update_repository.py +++ b/slpkg/update_repository.py @@ -725,13 +725,16 @@ class UpdateRepository(Configs): @staticmethod def read_short_description(path: Path, name: str) -> str: """ Returns the short description. """ - with open(Path(path, 'slack-desc'), 'r') as f: - slack = f.readlines() + slack_desc: Path = Path(path, 'slack-desc') + if slack_desc.is_file(): + with open(slack_desc, 'r') as f: + slack = f.readlines() - for line in slack: - pattern: str = f'{name}: {name}' - if line.startswith(pattern): - return line[len(name) + 1:].strip() + for line in slack: + pattern: str = f'{name}: {name}' + if line.startswith(pattern): + return line[len(name) + 1:].strip() + return '' @staticmethod def read_info_file(info_file: Path, start: str, stop: str) -> list: