diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2017-11-27 19:37:22 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2017-11-27 19:37:22 +0100 |
commit | 3ac6da2956c14981570b7c1d0a8328ecda8a14ac (patch) | |
tree | 6023d14bacfb671f3070df2c4b3c4c759cfd30cc /contrib | |
parent | cab2939d5e591216a60a03dc173fbaa676c8a7cd (diff) |
mock.py: set a different non-default http port from command line
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mock.py | 6 |
1 files changed, 5 insertions, 1 deletions
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) |