App.get_section(): Remove method
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m24s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m5s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m59s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m12s
CI / Packaging test (push) Successful in 0s
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m24s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m5s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m59s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m12s
CI / Packaging test (push) Successful in 0s
Remove App.get_section() which parses raw file sections by scanning for section headers and accumulating lines. This method is no longer needed since ProjectConf now handles all config file parsing.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9c8a09d696
commit
9fa617cfc8
1 changed files with 0 additions and 17 deletions
|
|
@ -526,23 +526,6 @@ class App(Base):
|
||||||
def strip_module_from_spec(self, mod):
|
def strip_module_from_spec(self, mod):
|
||||||
return re.sub(r'-dev$|-devel$|-run$', '', re.split('([=><]+)', mod)[0].strip())
|
return re.sub(r'-dev$|-devel$|-run$', '', re.split('([=><]+)', mod)[0].strip())
|
||||||
|
|
||||||
@cache
|
|
||||||
def get_section(self, path: str, section: str) -> str:
|
|
||||||
ret = ''
|
|
||||||
pat = '[' + section + ']'
|
|
||||||
in_section = False
|
|
||||||
file = open(path)
|
|
||||||
for line in file:
|
|
||||||
if line.rstrip() == pat:
|
|
||||||
in_section = True
|
|
||||||
continue
|
|
||||||
if in_section:
|
|
||||||
if len(line) and line[0] == '[':
|
|
||||||
break
|
|
||||||
ret += line
|
|
||||||
file.close()
|
|
||||||
return ret.rstrip()
|
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def get_value(self, project: str, section: str, key: str) -> str | None:
|
def get_value(self, project: str, section: str, key: str) -> str | None:
|
||||||
ret: str | None
|
ret: str | None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue