You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
491 B
21 lines
491 B
2 years ago
|
"""
|
||
|
Contains abstract class for a mirrored project
|
||
|
"""
|
||
|
|
||
|
from abc import ABC
|
||
|
|
||
|
import requests
|
||
|
|
||
|
from shared import CSC_MIRROR
|
||
|
|
||
|
|
||
|
class Project(ABC):
|
||
|
"""Abstract class for a mirrored project"""
|
||
|
|
||
|
@staticmethod
|
||
|
def check(data, project):
|
||
|
"""Check if project packages are up-to-date"""
|
||
|
csc_url = CSC_MIRROR + data[project]["csc"] + data[project]["file"]
|
||
|
upstream_url = data[project]["upstream"] + data[project]["file"]
|
||
|
return requests.get(csc_url).text == requests.get(upstream_url).text
|