distro/repo.py: add Repo.__repr__()
This commit is contained in:
parent
4ed0b8626b
commit
916be09c61
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ class Repo(RepoInfo):
|
||||||
if scan:
|
if scan:
|
||||||
self.scan()
|
self.scan()
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return f'<Repo:{self.name}:{self.arch}:{self.url_template}>'
|
||||||
|
|
||||||
def config_snippet(self) -> str:
|
def config_snippet(self) -> str:
|
||||||
options = {'Server': self.url_template} | self.options
|
options = {'Server': self.url_template} | self.options
|
||||||
return ('[%s]\n' % self.name) + '\n'.join([f"{key} = {value}" for key, value in options.items()])
|
return ('[%s]\n' % self.name) + '\n'.join([f"{key} = {value}" for key, value in options.items()])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue