Fix flake8 issues
This commit fixes a bunch of flake8 issues to unblock ci (assuming there was any).
This commit is contained in:
parent
5c263c402f
commit
1e7bde58bb
@ -1,3 +1,17 @@
|
|||||||
|
# Copyright 2017 IBM Corp.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
@ -7,8 +21,6 @@ import statsd
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MQTTStat(threading.Thread):
|
class MQTTStat(threading.Thread):
|
||||||
|
|
||||||
def __init__(self, hostname, topic, statsd_topic, statsd_type,
|
def __init__(self, hostname, topic, statsd_topic, statsd_type,
|
||||||
@ -120,8 +132,9 @@ def main():
|
|||||||
print('statsd_type %s on topic %s is not a valid type' % (
|
print('statsd_type %s on topic %s is not a valid type' % (
|
||||||
statsd_type, topic))
|
statsd_type, topic))
|
||||||
thread = MQTTStat(mqtt_hostname, topic, statsd_topic, statsd_type,
|
thread = MQTTStat(mqtt_hostname, topic, statsd_topic, statsd_type,
|
||||||
mqtt_port, websocket=websocket, auth=auth,
|
statsd_client, mqtt_port, websocket=websocket,
|
||||||
tls=tls, keepalive=mqtt_keepalive, qos=mqtt_qos)
|
auth=auth, tls=tls, keepalive=mqtt_keepalive,
|
||||||
|
qos=mqtt_qos)
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user