Zusammenstauchen und abhören, Sir.

This commit is contained in:
Klaus-Uwe Mitterer 2017-09-04 09:38:54 +02:00
parent b0cf187d0c
commit 9de5c45c75
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ arg = "w"
def check(site, recipient, two = twitools.twObject()): def check(site, recipient, two = twitools.twObject()):
status = httptools.getStatus(site) status = httptools.getStatus(site)
if not status == 200: if not status == 200:
if status == None: if not status:
two.tweet("@%s Site %s looks down from here!" % (recipient, site)) two.tweet("@%s Site %s looks down from here!" % (recipient, site))
else: else:
two.tweet("@%s Site %s returns status code %s!" % (recipient, site, status)) two.tweet("@%s Site %s returns status code %s!" % (recipient, site, status))

View file

@ -8,7 +8,7 @@ for mod in setuptools.getListSetting("KumiStatus", "modules"):
try: try:
name = mod + ".twitter" name = mod + ".twitter"
temp = importlib.import_module(name) temp = importlib.import_module(name)
p.add_argument("--" + mod, "-" + temp.arg, action="store_const", const=temp) p.add_argument("--" + mod[:-5], "-" + temp.arg, action="store_const", const=temp)
except Exception as e: except Exception as e:
print(e) print(e)