mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 21:25:43 -05:00
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:
|
||||
self.scan()
|
||||
|
||||
def __repr__(self):
|
||||
return f'<Repo:{self.name}:{self.arch}:{self.url_template}>'
|
||||
|
||||
def config_snippet(self) -> str:
|
||||
options = {'Server': self.url_template} | self.options
|
||||
return ('[%s]\n' % self.name) + '\n'.join([f"{key} = {value}" for key, value in options.items()])
|
||||
|
|
Loading…
Add table
Reference in a new issue