From d1bb9d98168e370f6e6192917a1256b9015eb85d Mon Sep 17 00:00:00 2001 From: Clemens Klug Date: Wed, 21 Nov 2018 15:12:30 +0100 Subject: [PATCH] fix missing self -.- --- src/target.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/target.py b/src/target.py index 09c9183..a2b9b15 100644 --- a/src/target.py +++ b/src/target.py @@ -5,7 +5,7 @@ log = logging.getLogger(__name__) class Target: - def send_data(date, status, time, url, protocol, station): + def send_data(self, date, status, time, url, protocol, station): raise NotImplementedError() @@ -20,7 +20,7 @@ class Influx(Target): string = string.replace(c, "\\"+c) return string - def send_data(date, status, time, url, protocol, station=00): + def send_data(self, date, status, time, url, protocol, station=00): data = "response_time,url={url},status={status},protocol={protocol},station={station} value={time} {timestamp}".format( url=influx_escape(url), status=influx_escape(str(status)), @@ -29,11 +29,11 @@ class Influx(Target): protocol=self.escape(protocol), station=station ) - r=requests.post(INFLUX_URL, data=data) + r = requests.post(INFLUX_URL, data=data) log.info(str(r) + " " + str(r.text)) return r.ok TARGETS = { "Influx": Influx, -} \ No newline at end of file +}