You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/01/04 04:27:20 UTC
svn commit: r895541 - /incubator/libcloud/trunk/libcloud/drivers/linode.py
Author: pquerna
Date: Mon Jan 4 03:27:14 2010
New Revision: 895541
URL: http://svn.apache.org/viewvc?rev=895541&view=rev
Log:
Use Exception class' args instead of .message, which is deprecated in 2.6.
Modified:
incubator/libcloud/trunk/libcloud/drivers/linode.py
Modified: incubator/libcloud/trunk/libcloud/drivers/linode.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/linode.py?rev=895541&r1=895540&r2=895541&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/linode.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/linode.py Mon Jan 4 03:27:14 2010
@@ -35,14 +35,11 @@
# Base exception for problems arising from this driver
-class LinodeException(BaseException):
- def __init__(self, code, message):
- self.code = code
- self.message = message
+class LinodeException(Exception):
def __str__(self):
- return "(%u) %s" % (self.code, self.message)
+ return "(%u) %s" % (self.args[0], self.args[1])
def __repr__(self):
- return "<LinodeException code %u '%s'>" % (self.code, self.message)
+ return "<LinodeException code %u '%s'>" % (self.args[0], self.args[1])
# For beta accounts, change this to "beta.linode.com".
LINODE_API = "api.linode.com"