return a DD exception instead of a standard error Closes #631
Signed-off-by: Tomaz Muraus <to...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/be0ee0a5 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/be0ee0a5 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/be0ee0a5 Branch: refs/heads/trunk Commit: be0ee0a5666a484eed94a9424567cedda76f7706 Parents: 79388f1 Author: Anthony Shaw <anthony.p.s...@gmail.com> Authored: Fri Nov 13 00:39:54 2015 +1100 Committer: Tomaz Muraus <to...@apache.org> Committed: Thu Nov 12 23:46:06 2015 +0100 ---------------------------------------------------------------------- libcloud/common/dimensiondata.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/be0ee0a5/libcloud/common/dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py index 268b7f1..1763104 100644 --- a/libcloud/common/dimensiondata.py +++ b/libcloud/common/dimensiondata.py @@ -250,7 +250,9 @@ class DimensionDataConnection(ConnectionUserAndKey): return response sleep(poll_interval) cnt+=1 - raise Error("Request timed out") + raise DimensionDataAPIException(code=response.status, + msg="Status check timed out", + driver=self.connection.driver) def _get_orgId(self): """