Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
attdona committed Oct 4, 2017
1 parent 513c418 commit ba65058
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions recipes/cc3200/mqtt_leds.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"""Switch the board leds using mqtt
"""
import asyncio
import click
import logging
import sys
import click
from hbmqtt.client import MQTTClient, ClientException
from hbmqtt.mqtt.constants import QOS_1, QOS_2
from hbmqtt.mqtt.constants import QOS_1
import pynais as ns
import commands as cmd

Expand All @@ -16,6 +18,8 @@


async def main(color, value, topic):
"""Starter
"""
sub_topic = 'hb/{}'.format(topic)

mqtt = MQTTClient()
Expand Down Expand Up @@ -51,11 +55,13 @@ async def main(color, value, topic):
@click.option('--off', 'value', flag_value='off')
@click.option('--topic', default='local/board')
def trampoline(color, value, topic):
"""Start asyncio loop
"""
loop = asyncio.get_event_loop()

loop.run_until_complete(main(color, value, topic))
loop.close()


# pylint: disable=E1120
if __name__ == "__main__":
trampoline()

0 comments on commit ba65058

Please sign in to comment.