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/10/07 22:06:43 UTC

svn commit: r1180195 - /libcloud/trunk/libcloud/utils.py

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):