kumistatus/skstools/twitter.py
2017-09-19 18:09:12 +02:00

15 lines
372 B
Python
Executable file

#!/usr/bin/python3
import time, setuptools, skstools, twitools
arg = "k"
def check(server, recipient, two = twitools.twObject()):
if skstools.getStatus(server) == False:
two.tweet("@%s Something seems to be wrong with the %s keyserver!" % (recipient, server))
def run():
servers = setuptools.getListSetting("SKS", "servers")
for s in servers:
check(s[0], s[1])