# HG changeset patch # User javier@citrico-linux # Date 1265125954 0 # Node ID 8ef28d08dec40c510dcd6b2fd18e1d3cf50f1f11 # Parent 37170963c47d622c236d9023f83d69be6bb3f126 CA-37148: Fix case when power on is disabled Signed-off-by: Javier.Alvarez-Valle@citrix.com diff -r 37170963c47d -r 8ef28d08dec4 scripts/poweron/power-on.py --- a/scripts/poweron/power-on.py Thu Jan 28 16:36:45 2010 +0000 +++ b/scripts/poweron/power-on.py Tue Feb 02 15:52:34 2010 +0000 @@ -9,6 +9,11 @@ import XenAPIPlugin +class HOST_POWER_ON_NOT_CONFIGURED(Exception): + """Base Exception class for all transfer plugin errors.""" + def __init__(self, *args): + Exception.__init__(self, *args) + def main(session, args): @@ -44,7 +49,7 @@ return modu.custom(session,remote_host,power_on_config) # Disabled else: - return str(False) + raise HOST_POWER_ON_NOT_CONFIGURED()