You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/05/10 14:19:04 UTC

svn commit: r1101423 - /incubator/libcloud/trunk/libcloud/resource/lb/drivers/gogrid.py

Author: tomaz
Date: Tue May 10 12:19:03 2011
New Revision: 1101423

URL: http://svn.apache.org/viewvc?rev=1101423&view=rev
Log:
Better error handling in the GoGrid LB driver - should thrown an exception
instead of returning None.

Modified:
    incubator/libcloud/trunk/libcloud/resource/lb/drivers/gogrid.py

Modified: incubator/libcloud/trunk/libcloud/resource/lb/drivers/gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/resource/lb/drivers/gogrid.py?rev=1101423&r1=1101422&r2=1101423&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/resource/lb/drivers/gogrid.py (original)
+++ incubator/libcloud/trunk/libcloud/resource/lb/drivers/gogrid.py Tue May 10 12:19:03 2011
@@ -21,9 +21,11 @@ try:
 except ImportError:
     import simplejson
 
+from libcloud.common.types import LibcloudError
+from libcloud.common.gogrid import GoGridConnection, BaseGoGridDriver
 from libcloud.resource.lb.base import LB, LBNode, LBDriver
 from libcloud.resource.lb.types import Provider, LBState, LibcloudLBImmutableError
-from libcloud.common.gogrid import GoGridConnection, BaseGoGridDriver
+
 
 class GoGridLBDriver(BaseGoGridDriver, LBDriver):
     connectionCls = GoGridConnection
@@ -149,7 +151,7 @@ class GoGridLBDriver(BaseGoGridDriver, L
             if "Update already pending" in str(err):
                 raise LibcloudLBImmutableError("Balancer is immutable", GoGridLBDriver)
 
-        return None
+        raise LibcloudError(value='Exception: %s' % str(err), driver=self)
 
     def _nodes_to_params(self, nodes):
         """