Reported by Iustin.
Reviewed-by: iustinp
obuf.write("Unhandled Ganeti error: %s" % msg)
elif isinstance(err, luxi.NoMasterError):
obuf.write("Cannot communicate with the master daemon.\nIs it running"
- " and listening on '%s'?" % err.args[0])
+ " and listening for connections?")
elif isinstance(err, luxi.TimeoutError):
obuf.write("Timeout while talking to the master daemon. Error:\n"
"%s" % msg)
except socket.timeout, err:
raise TimeoutError("Connect timed out: %s" % str(err))
except socket.error, err:
- if err.args[0] == errno.ENOENT:
+ if err.args[0] in (errno.ENOENT, errno.ECONNREFUSED):
raise NoMasterError((address,))
raise
self.socket.settimeout(self._rwtimeout)