From 9de5c45c755bc9829491b59b879f5949d02e4a1d Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 4 Sep 2017 09:38:54 +0200 Subject: [PATCH] =?UTF-8?q?Zusammenstauchen=20und=20abh=C3=B6ren,=20Sir.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- httptools/twitter.py | 2 +- twitter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httptools/twitter.py b/httptools/twitter.py index 1bcffed..5c08e89 100755 --- a/httptools/twitter.py +++ b/httptools/twitter.py @@ -7,7 +7,7 @@ arg = "w" def check(site, recipient, two = twitools.twObject()): status = httptools.getStatus(site) if not status == 200: - if status == None: + if not status: two.tweet("@%s Site %s looks down from here!" % (recipient, site)) else: two.tweet("@%s Site %s returns status code %s!" % (recipient, site, status)) diff --git a/twitter.py b/twitter.py index b2bd548..3cc0df0 100755 --- a/twitter.py +++ b/twitter.py @@ -8,7 +8,7 @@ for mod in setuptools.getListSetting("KumiStatus", "modules"): try: name = mod + ".twitter" 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: print(e)