
use flake8 as pep8 tools enable check and gate for pep8(voting) Fix below flake8 issues: E127 continuation line over-indented for visual indent E211 whitespace before '(' E222 multiple spaces after operator E302 expected 2 blank lines, found 1 E501 line too long (101 > 79 characters) E502 the backslash is redundant between brackets F401 'platform' imported but unused W391 blank line at end of file Change-Id: Idfb953e52c8ee35c2adefdf0e4143a381c7f49e2 Story: 2003426 Task: 24596 Signed-off-by: Sun Austin <austin.sun@intel.com>
20 lines
451 B
Python
20 lines
451 B
Python
#
|
|
# Copyright (c) 2015 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
from __future__ import print_function
|
|
import socket
|
|
import os
|
|
|
|
UDP_IP = socket.gethostbyname('controller')
|
|
UDP_PORT = 2188
|
|
ENV_MESSAGE = os.environ["MESSAGE"]
|
|
|
|
print("UDP target IP:", UDP_IP)
|
|
print("UDP target port:", UDP_PORT)
|
|
print("message:", ENV_MESSAGE)
|
|
|
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
sock.sendto(ENV_MESSAGE, (UDP_IP, UDP_PORT))
|