diff 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
line wrap: on
line diff
--- a/piecrust/serving/wrappers.py	Tue Feb 27 21:44:45 2018 -0800
+++ b/piecrust/serving/wrappers.py	Tue Feb 27 21:52:21 2018 -0800
@@ -100,7 +100,7 @@
     # Disable debugger PIN protection.
     os.environ['WERKZEUG_DEBUG_PIN'] = 'off'
 
-    if is_cmdline_mode:
+    if is_cmdline_mode and serve_admin:
         admin_url = 'http://%s:%s%s' % (host, port, '/pc-admin')
         logger.info("The administrative panel is available at: %s" %
                     admin_url)