diff options
author | evasquez <eric.vasquez@calxeda.com> | 2013-12-16 15:27:37 -0600 |
---|---|---|
committer | evasquez <eric.vasquez@calxeda.com> | 2013-12-16 15:27:37 -0600 |
commit | 563791b0b4dd98ddb990f3e51fac4ebce2cdb9b5 (patch) | |
tree | 5e037ae9460634d2169b4a230498b7f682fc1ce1 | |
parent | 5dc0d30fe656d67b8320b58b14a2e69f54dfb9e7 (diff) | |
download | cxmanage-563791b0b4dd98ddb990f3e51fac4ebce2cdb9b5.tar.gz |
nojira: Fix pylint error.
Signed-off-by: evasquez <eric.vasquez@calxeda.com>
-rw-r--r-- | cxmanage_api/fabric.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cxmanage_api/fabric.py b/cxmanage_api/fabric.py index 868a2dc..11c8a7d 100644 --- a/cxmanage_api/fabric.py +++ b/cxmanage_api/fabric.py @@ -237,7 +237,9 @@ class Fabric(object): old_nodes = {node.guid: node for node in self._nodes.values()} if wait: - error = None + error = TimeoutError( + 'Timeout after %s seconds occurred.' % timeout + ) deadline = time.time() + timeout while time.time() < deadline: try: @@ -247,12 +249,7 @@ class Fabric(object): except (IpmiError, TftpException, ParseError) as err: error = err else: - if (error): - raise error - else: - raise TimeoutError( - 'Timeout after %s seconds occurred.' % timeout - ) + raise error else: new_nodes = get_nodes() |