Welcome to mirror list, hosted at ThFree Co, Russian Federation.

run_http_server.py « tests - github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e4f8ac79ef8825f34d04c1602fd87d408a669a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
import runpy
import sys

# Run Python's built-in HTTP server
# Usage: python ./tests/run_http_server.py port_num
# NOTE: This script should be compatible with 2.7, 3.4+

# sys.argv (port number) is passed as-is to the HTTP server module
runpy.run_module(
    'http.server' if sys.version_info[0] == 3 else 'SimpleHTTPServer',
    run_name='__main__')