location,str
This commit is contained in:
parent
3707f42b77
commit
9cd6155f8c
4 changed files with 21 additions and 11 deletions
7
local.py
7
local.py
|
@ -8,13 +8,13 @@ import repository
|
|||
|
||||
class Local(repository.Repository):
|
||||
def __init__(self, args):
|
||||
self.directory = args[arguments.DIRECTORY]
|
||||
super().__init__(args[arguments.DIRECTORY])
|
||||
self.temporary = args[arguments.TEMPORARY]
|
||||
self.load()
|
||||
|
||||
def load(self):
|
||||
distribution = os.path.join(
|
||||
self.directory, msys.DISTRIBUTION)
|
||||
self.location, msys.DISTRIBUTION)
|
||||
d = {}
|
||||
_, architectures, _ = next(os.walk(distribution))
|
||||
for architecture in [a for a in architectures
|
||||
|
@ -34,8 +34,7 @@ class Local(repository.Repository):
|
|||
|
||||
def __str__(self):
|
||||
lines = [
|
||||
f'Directory: {self.directory}',
|
||||
f' → {os.path.realpath(self.directory)}',
|
||||
super().__str__(),
|
||||
'Archives:',
|
||||
]
|
||||
for architecture, archive in reversed(sorted(self.archives.items())):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue