Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
attdona committed Oct 8, 2017
1 parent 5cdf42d commit 86eb1b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
1 change: 0 additions & 1 deletion recipes/board_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
)
LOG = logging.getLogger('main')


async def handler(port):
"""read log messages form junction gateway and redirect to stdout
"""
Expand Down
22 changes: 13 additions & 9 deletions recipes/router.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""A junction demo setup.
"""
import logging
import sys
import json
Expand Down Expand Up @@ -68,25 +70,27 @@ def to_json(in_packet):
@click.command()
@click.option('--serial/--no-serial', default = True, help = 'serial simulator')
def main(serial):
"""Configure the junction endpoints
"""

web_page=ns.WSLine(port = 3000)
if (serial):
web_page = ns.WSLine(port=3000)
if serial:
# the real board
board=ns.SerialLine()
board = ns.SerialLine()
else:
# a software simulator or a tcp connected cc3200 board
board=ns.TcpLine(port = 3001)
board = ns.TcpLine(port=3001)

script=ns.TcpLine(port = 3002) # scripting endpoint, eg provisioning
script = ns.TcpLine(port=3002) # scripting endpoint, eg provisioning

# ns.junction.route(src=web_page, dst=board, src_to_dst=to_protobuf, dst_to_src=to_json)
ns.junction.route(src = web_page, dst = board,
src_to_dst = to_protobuf, dst_to_src = to_json)
ns.junction.route(src=web_page, dst=board,
src_to_dst=to_protobuf, dst_to_src=to_json)

ns.junction.route(src = board, dst = script)
ns.junction.route(src=board, dst=script)

ns.junction.run()


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

0 comments on commit 86eb1b8

Please sign in to comment.