forked from public/mirror-checker
19 lines
488 B
Python
19 lines
488 B
Python
#!/usr/bin/env python3
|
|
|
|
"""
|
|
This mirror status checker determines whether CSC mirror is up-to-date with upstream
|
|
"""
|
|
|
|
import requests
|
|
from arch import Arch
|
|
from debian import Debian
|
|
from kernel import Kernel
|
|
from openbsd import OpenBSD
|
|
|
|
if __name__ == "__main__":
|
|
for distro in [Arch, Debian, Kernel, OpenBSD]:
|
|
try:
|
|
distro.print_output(distro.check())
|
|
except requests.exceptions.RequestException as err:
|
|
print(f"Error: {distro.name()}\n{err}")
|