From 313ffd15504684dae8db26dbc021c84ea3e22637 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Thu, 29 Jul 2010 16:39:38 +0300 Subject: Doc Webdav: fix whitespace. bzr revid: p_christ@hol.gr-20100729133938-hk90sqo6zuzvzbks --- addons/document_webdav/webdav.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'addons/document_webdav/webdav.py') diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py index 8758723e232..1502ff204f8 100644 --- a/addons/document_webdav/webdav.py +++ b/addons/document_webdav/webdav.py @@ -30,14 +30,14 @@ import tools super_mk_prop_response = PROPFIND.mk_prop_response -def mk_prop_response(self, uri, good_props, bad_props, doc): - """ make a new result element +def mk_prop_response(self, uri, good_props, bad_props, doc): + """ make a new result element We differ between the good props and the bad ones for each generating an extra -Node (for each error one, that means). - - """ + + """ re=doc.createElement("D:response") # append namespaces to response nsnum=0 @@ -47,7 +47,7 @@ def mk_prop_response(self, uri, good_props, bad_props, doc): for nsname in namespaces: re.setAttribute("xmlns:ns"+str(nsnum),nsname) nsnum=nsnum+1 - + # write href information uparts=urlparse.urlparse(uri) fileloc=uparts[2] @@ -90,7 +90,7 @@ def mk_prop_response(self, uri, good_props, bad_props, doc): pe.appendChild(ve) gp.appendChild(pe) - + ps.appendChild(gp) s=doc.createElement("D:status") t=doc.createTextNode("HTTP/1.1 200 OK") @@ -113,11 +113,11 @@ def mk_prop_response(self, uri, good_props, bad_props, doc): ns_prefix='D:' else: ns_prefix="ns"+str(self.namespaces.index(ns))+":" - + for p in bad_props[ecode][ns]: pe=doc.createElement(ns_prefix+str(p)) bp.appendChild(pe) - + s=doc.createElement("D:status") t=doc.createTextNode(utils.gen_estring(ecode)) s.appendChild(t) @@ -126,10 +126,10 @@ def mk_prop_response(self, uri, good_props, bad_props, doc): # return the new response element return re - + def mk_propname_response(self,uri,propnames,doc): - """ make a new result element for a PROPNAME request + """ make a new result element for a PROPNAME request This will simply format the propnames list. propnames should have the format {NS1 : [prop1, prop2, ...], NS2: ...} -- cgit v1.2.3