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/02/24 06:54:26 UTC
svn commit: r915692 - /incubator/libcloud/trunk/libcloud/drivers/rackspace.py
Author: pquerna
Date: Wed Feb 24 05:54:26 2010
New Revision: 915692
URL: http://svn.apache.org/viewvc?rev=915692&view=rev
Log:
Do not set objects like dicts in the kwargs, as they get referenced/reused between multiple objects.
Modified:
incubator/libcloud/trunk/libcloud/drivers/rackspace.py
Modified: incubator/libcloud/trunk/libcloud/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/rackspace.py?rev=915692&r1=915691&r2=915692&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/rackspace.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/rackspace.py Wed Feb 24 05:54:26 2010
@@ -110,14 +110,18 @@
return self.__host
- def request(self, action, params={}, data='', headers={}, method='GET'):
+ def request(self, action, params=None, data='', headers=None, method='GET'):
+ if not headers:
+ headers = {}
+ if not params:
+ params = {}
# Due to first-run authentication request, we may not have a path
if self.path:
action = self.path + action
if method == "POST":
headers = {'Content-Type': 'application/xml; charset=UTF-8'}
if method == "GET":
- params['cache-busting'] = os.urandom(8).encode('hex')
+ params['cache-busting'] = os.urandom(8).encode('hex')
return super(RackspaceConnection, self).request(
action=action,
params=params, data=data,