31 lines
929 B

Contains Kernel class
import requests
from distro import Distro
from shared import CSC_MIRROR
class Kernel(Distro):
"""Kernel class"""
def __get_line_count(checksum_file_url):
"""Get Kernel line count of checksum file"""
response_text = requests.get(checksum_file_url).text
return len(response_text.split('\n'))
def name():
"""Get name of Kernel"""
return "Kernel"
def check():
"""Check if Kernel packages are up-to-date"""
official_line_count = Kernel.__get_line_count(
csc_line_count = Kernel.__get_line_count(
# A new update on a certain day adds 2 new lines
return official_line_count <= csc_line_count + 2