Avoid duplicating exception message

Now that we have exception chaining working nicely we
do not need to duplicate the original exceptions message
in followup exceptions (as the chain will by its very nature
have this same information/message); so let's stop duplicating
it.

Change-Id: I9b947c0d8c1df894de346835f92c12e8773349c4
This commit is contained in:
Joshua Harlow
2015-05-06 18:41:39 -07:00
parent a37a881764
commit 73b98de8b4

View File

@@ -97,12 +97,12 @@ class ZkConnection(path_based.PathBasedConnection):
except k_exc.SessionExpiredError:
exc.raise_with_cause(exc.StorageFailure,
"Storage backend session has expired")
except k_exc.NoNodeError as e:
except k_exc.NoNodeError:
exc.raise_with_cause(exc.NotFound,
"Storage backend node not found: %s" % e)
except k_exc.NodeExistsError as e:
"Storage backend node not found")
except k_exc.NodeExistsError:
exc.raise_with_cause(exc.Duplicate,
"Storage backend duplicate node: %s" % e)
"Storage backend duplicate node")
except (k_exc.KazooException, k_exc.ZookeeperError):
exc.raise_with_cause(exc.StorageFailure,
"Storage backend internal error")