Browse Source

[530] Display socket file used in error message

When there is an error connecting to the message queue socket file
because it wasn't cleaned up properly, and we know the name of the
socket file, display its name as part of the error message.

No ChangeLog entry required.
Kean Johnston 11 years ago
parent
commit
b756633d52
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/bin/bind10/init.py.in

+ 6 - 2
src/bin/bind10/init.py.in

@@ -741,8 +741,12 @@ class Init:
         try:
             self.cc_session = isc.cc.Session(self.msgq_socket_file)
             logger.fatal(BIND10_MSGQ_ALREADY_RUNNING)
-            return "b10-msgq already running, or socket file not cleaned , " +\
-                "cannot start"
+            if self.msgq_socket_file is not None:
+              socket_name = "socket file '" + self.msg_socket_file + "'"
+            else:
+              socket_name = "default socket file"
+            return "b10-msgq already running, or " + socket_name +\
+                " not cleaned - cannot start"
         except isc.cc.session.SessionError:
             # this is the case we want, where the msgq is not running
             pass