Fixed and added error message if no backends initialized. INVALID COMMAND is printed when RuntimeError is raised, so we don't get to see the error's message

This commit is contained in:
Lee Clemens 2012-01-12 00:29:36 -05:00
parent 29c8e43354
commit a1898b1840

View file

@ -68,8 +68,11 @@ class Jail:
except ImportError, e:
logSys.debug(
"Backend %r failed to initialize due to %s" % (b, e))
# log error since runtime error message isn't printed, INVALID COMMAND
logSys.error(
"Failed to initialize any backend for jail %s" % self.__name)
raise RuntimeError(
"We should have initialized at least 'polling' backend")
"Failed to initialize any backend for jail %s" % self.__name)
def _initPolling(self):