forked from public/mirror-checker
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.
22 lines
538 B
22 lines
538 B
2 years ago
|
"""
|
||
|
Contains Eclipse class
|
||
|
"""
|
||
|
|
||
|
from distro import Distro
|
||
|
from shared import CSC_MIRROR, get_sec
|
||
|
|
||
|
class Eclipse(Distro):
|
||
|
"""Eclipse class"""
|
||
|
@staticmethod
|
||
|
def name():
|
||
|
"""Get name of Eclipse"""
|
||
|
return "Eclipse"
|
||
|
|
||
|
@staticmethod
|
||
|
def check():
|
||
|
"""Check if Eclipse packages are up-to-date"""
|
||
|
official_sec = get_sec("http://download.eclipse.org/TIME")
|
||
|
csc_sec = get_sec(f"{CSC_MIRROR}eclipse/TIME")
|
||
|
# Out-of-sync by 2 days maximum
|
||
|
return official_sec < csc_sec + 172800
|