diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py
index fe1b3dc3d..8ddd9a00b 100644
--- a/IPython/frontend/html/notebook/notebookapp.py
+++ b/IPython/frontend/html/notebook/notebookapp.py
@@ -470,11 +470,14 @@ class NotebookApp(BaseIPythonApplication):
ssl_options = None
self.web_app.password = self.password
self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options)
- if ssl_options is None and not self.ip and not (self.read_only and not self.password):
- self.log.critical('WARNING: the notebook server is listening on all IP addresses '
- 'but not using any encryption or authentication. This is highly '
- 'insecure and not recommended.')
-
+ if not self.ip:
+ warning = "WARNING: The notebook server is listening on all IP addresses"
+ if ssl_options is None:
+ self.log.critical(warning + " and not using encryption. This"
+ "is not recommended.")
+ if not self.password and not self.read_only:
+ self.log.critical(warning + "and not using authentication."
+ "This is highly insecure and not recommended.")
success = None
for port in random_ports(self.port, self.port_retries+1):
try: