summaryrefslogtreecommitdiff
path: root/addons/document_webdav
diff options
context:
space:
mode:
authorAntonin Bourguignon <abo@openerp.com>2012-10-02 14:06:34 +0200
committerAntonin Bourguignon <abo@openerp.com>2012-10-02 14:06:34 +0200
commitc28dfb19e19ea9dde6de2ae5fb20cfec3860744e (patch)
tree4fdff0732f33426af59c7792b8e727458afe913c /addons/document_webdav
parent79b2a0f6c6017d984b15160b8be806ecf7131b3e (diff)
parent2b2288a3bd29c096cc5eb70c4d966cfd32bffc45 (diff)
[MERGE] trunk-unmutable-defaults-abo: fix the last few methods that still have mutable defaults
also improve code style (methods signatures and whitespaces) contribution of Lionel Sausin from Numerigraphe bzr revid: abo@openerp.com-20121002120634-ms2ins653tktqfnt
Diffstat (limited to 'addons/document_webdav')
-rw-r--r--addons/document_webdav/document_webdav.py2
-rw-r--r--addons/document_webdav/redirect.py2
-rw-r--r--[-rwxr-xr-x]addons/document_webdav/test_davclient.py3
-rw-r--r--addons/document_webdav/webdav.py2
-rw-r--r--addons/document_webdav/webdav_server.py12
5 files changed, 10 insertions, 11 deletions
diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py
index f53353dd43c..3b604d6cffb 100644
--- a/addons/document_webdav/document_webdav.py
+++ b/addons/document_webdav/document_webdav.py
@@ -57,7 +57,7 @@ class document_davdir(osv.osv):
# TODO group
return
- def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext):
+ def _locate_child(self, cr, uid, root_id, uri, nparent, ncontext):
""" try to locate the node in uri,
Return a tuple (node_dir, remaining_path)
"""
diff --git a/addons/document_webdav/redirect.py b/addons/document_webdav/redirect.py
index 31f462bcbbe..c3dd9248f45 100644
--- a/addons/document_webdav/redirect.py
+++ b/addons/document_webdav/redirect.py
@@ -30,7 +30,7 @@ class RedirectHTTPHandler(HttpLogHandler, FixSendError, HttpOptions, HTTPHandler
_HTTP_OPTIONS = { 'Allow': ['OPTIONS', 'GET', 'HEAD', 'PROPFIND'] }
redirect_paths = {}
- def __init__(self,request, client_address, server):
+ def __init__(self, request, client_address, server):
HTTPHandler.__init__(self,request,client_address,server)
def send_head(self):
diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py
index 0f66363c553..79ee471c69e 100755..100644
--- a/addons/document_webdav/test_davclient.py
+++ b/addons/document_webdav/test_davclient.py
@@ -683,7 +683,7 @@ class DAVClient(object):
assert d2 == d, "Data does not match"
return ctype, rrange, d
- def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False, ):
+ def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False):
""" HTTP PUT
@param noclobber will prevent overwritting a resource (If-None-Match)
@param mime will set the content-type
@@ -705,5 +705,4 @@ class DAVClient(object):
etag = m.getheader('ETag')
return etag or True
-#eof
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py
index 903dd6a16ba..f714ff51518 100644
--- a/addons/document_webdav/webdav.py
+++ b/addons/document_webdav/webdav.py
@@ -236,7 +236,7 @@ def mk_prop_response(self, uri, good_props, bad_props, doc):
return re
-def mk_propname_response(self,uri,propnames,doc):
+def mk_propname_response(self, uri, propnames, doc):
""" make a new <prop> result element for a PROPNAME request
This will simply format the propnames list.
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
index 28909e61167..70ad4d2657f 100644
--- a/addons/document_webdav/webdav_server.py
+++ b/addons/document_webdav/webdav_server.py
@@ -81,7 +81,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
'DELETE', 'TRACE', 'REPORT', ]
}
- def get_userinfo(self,user,pw):
+ def get_userinfo(self, user, pw):
return False
def _log(self, message):
@@ -167,7 +167,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
self.close_connection = 1
DAVRequestHandler.send_header(self, key, value)
- def send_body(self, DATA, code = None, msg = None, desc = None, ctype='application/octet-stream', headers=None):
+ def send_body(self, DATA, code=None, msg=None, desc=None, ctype='application/octet-stream', headers=None):
if headers and 'Connection' in headers:
pass
elif self.request_version in ('HTTP/1.0', 'HTTP/0.9'):
@@ -441,10 +441,10 @@ class dummy_dav_interface(object):
def __init__(self, parent):
self.parent = parent
- def get_propnames(self,uri):
+ def get_propnames(self, uri):
return self.PROPS
- def get_prop(self,uri,ns,propname):
+ def get_prop(self, uri, ns, propname):
if self.M_NS.has_key(ns):
prefix=self.M_NS[ns]
else:
@@ -460,10 +460,10 @@ class dummy_dav_interface(object):
def get_data(self, uri, range=None):
raise DAV_NotFound
- def _get_dav_creationdate(self,uri):
+ def _get_dav_creationdate(self, uri):
return time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
- def _get_dav_getlastmodified(self,uri):
+ def _get_dav_getlastmodified(self, uri):
return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())
def _get_dav_displayname(self, uri):