distro/repo: add repo.resolve_url(self) instance method
This commit is contained in:
parent
6bff3c3c83
commit
0d05d3ca26
1 changed files with 4 additions and 1 deletions
|
@ -34,8 +34,11 @@ class Repo(RepoInfo):
|
||||||
remote: bool
|
remote: bool
|
||||||
scanned: bool = False
|
scanned: bool = False
|
||||||
|
|
||||||
|
def resolve_url(self) -> str:
|
||||||
|
return resolve_url(self.url_template, repo_name=self.name, arch=self.arch)
|
||||||
|
|
||||||
def scan(self):
|
def scan(self):
|
||||||
self.resolved_url = resolve_url(self.url_template, repo_name=self.name, arch=self.arch)
|
self.resolved_url = self.resolve_url()
|
||||||
self.remote = not self.resolved_url.startswith('file://')
|
self.remote = not self.resolved_url.startswith('file://')
|
||||||
uri = f'{self.resolved_url}/{self.name}.db'
|
uri = f'{self.resolved_url}/{self.name}.db'
|
||||||
path = ''
|
path = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue