kumistatus/skstools/twitter.py

14 lines
370 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, site))
def run():
servers = setuptools.getListSetting("SKS", "servers")
for s in servers:
check(s[0], s[1])