Remove unneeded semicolons from Python files

This commit is contained in:
John Bampton 2020-12-10 13:43:57 +10:00 committed by Xiang Xiao
parent 6ecf9dc5ef
commit 7a5f7d470f
3 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ def send_discover(socket):
cmd[2] = DISCOVER_ALL cmd[2] = DISCOVER_ALL
chksum = 0 chksum = 0
for c in cmd[:3]: for c in cmd[:3]:
chksum -= c; chksum -= c
cmd[3] = chksum & 0xff cmd[3] = chksum & 0xff
socket.sendto(cmd, ('<broadcast>', PORT)) socket.sendto(cmd, ('<broadcast>', PORT))
@ -90,7 +90,7 @@ if __name__ == '__main__':
s = socket(AF_INET, SOCK_DGRAM) s = socket(AF_INET, SOCK_DGRAM)
s.bind(('0.0.0.0', PORT)) s.bind(('0.0.0.0', PORT))
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
s.settimeout(1.0); s.settimeout(1.0)
send_discover(s) send_discover(s)
devices = read_responses(s) devices = read_responses(s)
socket.close(s) socket.close(s)

View File

@ -216,7 +216,7 @@ class TelnetDev:
def __init__(self): def __init__(self):
srv_ipaddr = ConfigArgs.SERVER_IP srv_ipaddr = ConfigArgs.SERVER_IP
srv_port = ConfigArgs.SERVER_PORT srv_port = ConfigArgs.SERVER_PORT
self.recvbuf = b''; self.recvbuf = b''
try: try:
self.telnet = telnetlib.Telnet(host=srv_ipaddr, port=srv_port, timeout=10) self.telnet = telnetlib.Telnet(host=srv_ipaddr, port=srv_port, timeout=10)
# There is a ack to be sent after connecting to the telnet server. # There is a ack to be sent after connecting to the telnet server.

View File

@ -252,7 +252,7 @@ if __name__ == "__main__":
downwordaddr=0 downwordaddr=0
while (downwordaddr<length): while (downwordaddr<length):
if (ocd.readVariable(baseaddr+downwordaddr)==LWL_SIG): if (ocd.readVariable(baseaddr+downwordaddr)==LWL_SIG):
break; break
downwordaddr=downwordaddr+4 downwordaddr=downwordaddr+4
if (downwordaddr>=length): if (downwordaddr>=length):