From 3ac6da2956c14981570b7c1d0a8328ecda8a14ac Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 27 Nov 2017 19:37:22 +0100 Subject: mock.py: set a different non-default http port from command line --- contrib/mock.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/mock.py b/contrib/mock.py index fe75814..8776b51 100755 --- a/contrib/mock.py +++ b/contrib/mock.py @@ -68,4 +68,8 @@ if __name__ == '__main__': except IndexError: listen_adr = '127.0.0.1' print 'Listen Address:', listen_adr - run(host=listen_adr, port=80) + try: + listen_port = argv[3] + except IndexError: + listen_port = 80 + run(host=listen_adr, port=listen_port) -- cgit v1.2.3