srlp/distribution.py

21 lines
503 B
Python
Raw Normal View History

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