mrmp/distribution.py

21 lines
503 B
Python
Raw Normal View History

2021-10-10 13:22:02 +00:00
import os
2021-10-10 14:50:15 +00:00
DISTRIBUTION = 'distrib'
2021-10-10 13:22:02 +00:00
class Distribution:
def __init__(self, architecture):
self.architecture = architecture
2021-10-10 14:50:15 +00:00
self.path = os.sep.join([DISTRIBUTION, self.architecture.name])
2021-10-10 18:27:48 +00:00
self.load()
def load(self):
files = self.architecture.repository.get_files(self.path)
2021-10-10 13:22:02 +00:00
def __str__(self):
lines = [
f'Architecture: {self.architecture.name}',
2021-10-10 14:50:15 +00:00
f' Path: {self.path}',
2021-10-10 13:22:02 +00:00
]
return os.linesep.join(lines)