kumistatus/skstools/twitter.py

15 lines
370 B
Python
Raw Normal View History

2017-06-22 15:16:13 +00:00
#!/usr/bin/python3
import time, setuptools, skstools, twitools
arg = "k"
2017-06-22 15:16:13 +00:00
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():
2017-06-22 15:16:13 +00:00
servers = setuptools.getListSetting("SKS", "servers")
for s in servers:
check(s[0], s[1])