From 18ac452b17e51153812dc5849d667ccb862c1360 Mon Sep 17 00:00:00 2001 From: Juan Pablo Date: Fri, 7 May 2021 15:45:25 +0200 Subject: [PATCH] Update ntpclient.py Read the host from command line args --- source/python/ntpclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/python/ntpclient.py b/source/python/ntpclient.py index 00d33b7..9580194 100644 --- a/source/python/ntpclient.py +++ b/source/python/ntpclient.py @@ -13,7 +13,7 @@ import socket import struct, time # To unpack the packet sent back and to convert the seconds to a string. -host = "pool.ntp.org"; # The server. +host = sys.argv[1]; # The server from command line. port = 123; # Port. read_buffer = 1024; # The size of the buffer to read in the received UDP packet. address = ( host, port ); # Tuple needed by sendto.