mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Updated for description
This commit is contained in:
parent
616bd4a54d
commit
9b040767d5
1 changed files with 9 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue