Updated for description

This commit is contained in:
Dimitris Zlatanidis 2023-05-04 09:13:58 +03:00
parent 616bd4a54d
commit 9b040767d5

View file

@ -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: