mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
Updated comments
This commit is contained in:
parent
8a2d2f00d9
commit
59a3c52cfc
1 changed files with 3 additions and 3 deletions
|
@ -76,7 +76,7 @@ class Utilities(Configs):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def split_package(package: str) -> dict:
|
def split_package(package: str) -> dict:
|
||||||
""" Split the package by the name, version, arch, build and tag. """
|
""" Splits the binary package name in name, version, arch, build and tag. """
|
||||||
name: str = '-'.join(package.split('-')[:-3])
|
name: str = '-'.join(package.split('-')[:-3])
|
||||||
version: str = ''.join(package[len(name):].split('-')[:-2])
|
version: str = ''.join(package[len(name):].split('-')[:-2])
|
||||||
arch: str = ''.join(package[len(name + version) + 2:].split('-')[:-1])
|
arch: str = ''.join(package[len(name + version) + 2:].split('-')[:-1])
|
||||||
|
@ -138,7 +138,7 @@ class Utilities(Configs):
|
||||||
self.errors.raise_error_message(f"No such file or directory: '{file}'", exit_status=20)
|
self.errors.raise_error_message(f"No such file or directory: '{file}'", exit_status=20)
|
||||||
|
|
||||||
def read_text_file(self, file: Path) -> list:
|
def read_text_file(self, file: Path) -> list:
|
||||||
""" Reads the text file. """
|
""" Reads the text file and returns it into a list. """
|
||||||
try:
|
try:
|
||||||
with open(file, 'r', encoding='utf-8', errors='replace') as text_file:
|
with open(file, 'r', encoding='utf-8', errors='replace') as text_file:
|
||||||
return text_file.readlines()
|
return text_file.readlines()
|
||||||
|
@ -210,7 +210,7 @@ class Utilities(Configs):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def is_binary_repo(self, repo: str) -> bool:
|
def is_binary_repo(self, repo: str) -> bool:
|
||||||
""" Checks if the repository is binary. """
|
""" Returns True if the repository is binary. """
|
||||||
if repo in tuple(self.repos.repositories.keys())[2:]:
|
if repo in tuple(self.repos.repositories.keys())[2:]:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue