diff options
author | George Kraft <george.kraft@calxeda.com> | 2013-06-24 10:14:38 -0500 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2013-06-24 10:14:38 -0500 |
commit | 79db60f312fab7203d5e5b1c3f4fca4c3718744c (patch) | |
tree | b09dd0355debc61a1c1cb5d325e6c12dcc198cde | |
parent | fa3e1cb57879989197e8758521f6474ead954d22 (diff) | |
download | cxmanage-79db60f312fab7203d5e5b1c3f4fca4c3718744c.tar.gz |
CXMAN-206: Remove NoFirmwareInfoError
pyipmi should raise a proper IpmiError now.
-rw-r--r-- | cxmanage_api/cx_exceptions.py | 25 | ||||
-rw-r--r-- | cxmanage_api/node.py | 9 |
2 files changed, 2 insertions, 32 deletions
diff --git a/cxmanage_api/cx_exceptions.py b/cxmanage_api/cx_exceptions.py index 410b5d7..b74a927 100644 --- a/cxmanage_api/cx_exceptions.py +++ b/cxmanage_api/cx_exceptions.py @@ -109,31 +109,6 @@ class NoSensorError(Exception): return self.msg -class NoFirmwareInfoError(Exception): - """Raised when the firmware info cannot be obtained from a node. - - >>> from cxmanage_api.cx_exceptions import NoFirmwareInfoError - >>> raise NoFirmwareInfoError('My custom exception text!') - Traceback (most recent call last): - File "<stdin>", line 1, in <module> - cxmanage_api.cx_exceptions.NoFirmwareInfoError: My custom exception text! - - :param msg: Exceptions message and details to return to the user. - :type msg: string - :raised: When the firmware info cannot be obtained from a node. - - """ - - def __init__(self, msg): - """Default constructor for the NoFirmwareInfoError class.""" - super(NoFirmwareInfoError, self).__init__() - self.msg = msg - - def __str__(self): - """String representation of this Exception class.""" - return self.msg - - class SocmanVersionError(Exception): """Raised when there is an error with the users socman version. diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py index 50757f7..58f0a8a 100644 --- a/cxmanage_api/node.py +++ b/cxmanage_api/node.py @@ -45,9 +45,8 @@ from cxmanage_api.image import Image as IMAGE from cxmanage_api.ubootenv import UbootEnv as UBOOTENV from cxmanage_api.ip_retriever import IPRetriever as IPRETRIEVER from cxmanage_api.cx_exceptions import TimeoutError, NoSensorError, \ - NoFirmwareInfoError, SocmanVersionError, FirmwareConfigError, \ - PriorityIncrementError, NoPartitionError, TransferFailure, \ - ImageSizeError, PartitionInUseError + SocmanVersionError, FirmwareConfigError, PriorityIncrementError, \ + NoPartitionError, TransferFailure, ImageSizeError, PartitionInUseError class Node(object): @@ -495,14 +494,11 @@ class Node(object): :return: Returns a list of FWInfo objects for each :rtype: list - :raises NoFirmwareInfoError: If no fw info exists for any partition. :raises IpmiError: If errors in the command occur with BMC communication. """ fwinfo = [x for x in self.bmc.get_firmware_info() if hasattr(x, "partition")] - if (len(fwinfo) == 0): - raise NoFirmwareInfoError("Failed to retrieve firmware info") # Clean up the fwinfo results for entry in fwinfo: @@ -548,7 +544,6 @@ class Node(object): :return: Returns a list of FWInfo objects for each :rtype: list - :raises NoFirmwareInfoError: If no fw info exists for any partition. :raises IpmiError: If errors in the command occur with BMC communication. """ |