diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-12 23:57:15 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-12 23:57:15 +0000 |
commit | 7e4a3dd8f28450dc2fc7b19ed1ba281a0ba8ccec (patch) | |
tree | b7a2d662599b1016f77db5e4b6bcb583291293ff | |
parent | c557d7c5ad4b8c791c60d79c55e4925d7d3196ac (diff) | |
download | git-deps-7e4a3dd8f28450dc2fc7b19ed1ba281a0ba8ccec.tar.gz |
allow specifying the webserver's TCP port to listen on
-rwxr-xr-x | git-deps | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -615,6 +615,9 @@ def parse_args(): parser.add_argument('-s', '--serve', dest='serve', action='store_true', help='Run a web server for visualizing the ' 'dependency graph') + parser.add_argument('-p', '--port', dest='port', type=int, metavar='PORT', + default=5000, + help='Port number for webserver [%(default)s]') parser.add_argument('-r', '--recurse', dest='recurse', action='store_true', help='Follow dependencies recursively') parser.add_argument('-e', '--exclude-commits', dest='exclude_commits', @@ -761,7 +764,7 @@ def serve(options): "insecure!") print("!! Arbitrary code can be executed from browser!") print() - webserver.run(debug=options.debug) + webserver.run(port=options.port, debug=options.debug) def main(): |