2025-04-29 17:35:21 +02:00
|
|
|
|
#
|
|
|
|
|
|
# Erminig - Classe abstraite pour la récupération des nouvelles version de softs.
|
|
|
|
|
|
# Copyright (C) 2025 L0m1g
|
|
|
|
|
|
# Sous licence DOUARN - Voir le fichier LICENCE pour les détails
|
|
|
|
|
|
#
|
|
|
|
|
|
# Ce fichier fait partie du projet Erminig.
|
|
|
|
|
|
# Libre comme l’air, stable comme un menhir, et salé comme le beurre.
|
|
|
|
|
|
#
|
|
|
|
|
|
|
2025-04-29 17:15:19 +02:00
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UpstreamSource(ABC):
|
|
|
|
|
|
MAX_RETRIES = 2
|
|
|
|
|
|
RETRY_DELAY = 2 # secondes
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, name, config):
|
|
|
|
|
|
self.name = name
|
|
|
|
|
|
self.config = config
|
|
|
|
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
|
|
def get_latest(self):
|
|
|
|
|
|
pass
|