libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1180195 - /libcloud/trunk/libcloud/utils.py
Date Fri, 07 Oct 2011 20:06:43 GMT
Author: tomaz
Date: Fri Oct  7 20:06:43 2011
New Revision: 1180195

URL: http://svn.apache.org/viewvc?rev=1180195&view=rev
Log:
Make namespace argument optional.

Modified:
    libcloud/trunk/libcloud/utils.py

Modified: libcloud/trunk/libcloud/utils.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/utils.py?rev=1180195&r1=1180194&r2=1180195&view=diff
==============================================================================
--- libcloud/trunk/libcloud/utils.py (original)
+++ libcloud/trunk/libcloud/utils.py Fri Oct  7 20:06:43 2011
@@ -184,8 +184,11 @@ def dict2str(data):
 
     return result
 
-def fixxpath(xpath, namespace):
+def fixxpath(xpath, namespace=None):
     # ElementTree wants namespaces in its xpaths, so here we add them.
+    if not namespace:
+        return xpath
+
     return '/'.join(['{%s}%s' % (namespace, e) for e in xpath.split('/')])
 
 def findtext(element, xpath, namespace):



Mime
View raw message