Mercurial > piecrust2
comparison piecrust/serving/wrappers.py @ 1122:587bccf72d75
serve: Only tell about the admin panel if needed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 27 Feb 2018 21:52:21 -0800 |
parents | e8511fed42a3 |
children |
comparison
equal
deleted
inserted
replaced
1121:41b7ce0d5131 | 1122:587bccf72d75 |
---|---|
98 lambda *args: _shutdown_server_and_raise_sigint()) | 98 lambda *args: _shutdown_server_and_raise_sigint()) |
99 | 99 |
100 # Disable debugger PIN protection. | 100 # Disable debugger PIN protection. |
101 os.environ['WERKZEUG_DEBUG_PIN'] = 'off' | 101 os.environ['WERKZEUG_DEBUG_PIN'] = 'off' |
102 | 102 |
103 if is_cmdline_mode: | 103 if is_cmdline_mode and serve_admin: |
104 admin_url = 'http://%s:%s%s' % (host, port, '/pc-admin') | 104 admin_url = 'http://%s:%s%s' % (host, port, '/pc-admin') |
105 logger.info("The administrative panel is available at: %s" % | 105 logger.info("The administrative panel is available at: %s" % |
106 admin_url) | 106 admin_url) |
107 | 107 |
108 try: | 108 try: |