summaryrefslogtreecommitdiff
path: root/addons/document_webdav
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2009-12-17 14:32:52 +0530
committerHarry (Open ERP) <hmo@tinyerp.com>2009-12-17 14:32:52 +0530
commit33f9180c0cc11b1fbb4a5fee8caeb7faffd2de68 (patch)
tree0d8229912dc2d1d037f0215b2436176824a9787e /addons/document_webdav
parentad5882ec42eb4f923f38cb73c9e23559bff1594b (diff)
[FIX] document_webdav: close another 2 cursors, avoid deadlock. taken from xrg git branch:fc70e930c1e89c868c613fdc83534e9f853dcfa2
bzr revid: hmo@tinyerp.com-20091217090252-f9thyune5j2dcxa6
Diffstat (limited to 'addons/document_webdav')
-rw-r--r--addons/document_webdav/dav_fs.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py
index 0d8331b8959..68f0bd71c40 100644
--- a/addons/document_webdav/dav_fs.py
+++ b/addons/document_webdav/dav_fs.py
@@ -150,6 +150,7 @@ class tinydav_handler(dav_interface):
if not dbname:
s = netsvc.LocalService('db')
+ cr.close()
return map(lambda x: self.urijoin(x), self.db_list())
result = []
node = self.uri2object(cr,uid,pool, uri2[:])
@@ -354,11 +355,6 @@ class tinydav_handler(dav_interface):
node = self.uri2object(cr,uid,pool, uri2)
if not node:
raise DAV_NotFound(uri2)
-
- result = 'application/octet-stream'
- #if node.type=='collection':
- #result ='httpd/unix-directory'
- #else:
result = node.mimetype
return result
#raise DAV_NotFound, 'Could not find %s' % path
@@ -469,6 +465,7 @@ class tinydav_handler(dav_interface):
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
#if not dbname:
if True:
+ cr.close()
raise DAV_Error, 409
node = self.uri2object(cr,uid,pool, uri2)
object2=node and node.object2 or False
@@ -637,6 +634,7 @@ class tinydav_handler(dav_interface):
result = False
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
if not dbname:
+ cr.close()
return True
try:
node = self.uri2object(cr,uid,pool, uri2)