summaryrefslogtreecommitdiff
path: root/addons/document_ftp
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-07-13 13:30:35 +0300
committerP. Christeas <p_christ@hol.gr>2010-07-13 13:30:35 +0300
commit8cd367f9ed6e49bc46c5dcccd2d52c5b9a6c4329 (patch)
treeebb1a78b5d04e07414a6c774be4742678eef7831 /addons/document_ftp
parenta7eaf3bfc955fee567f858f570a09eaadf38ee1b (diff)
Document FTP: fix open_data after 1e1118a2bd7ae
After the revert, the node exception is TypeError (so that it is clearly distinguishable from any others). bzr revid: p_christ@hol.gr-20100713103035-usb1dbnma2l9c4ju
Diffstat (limited to 'addons/document_ftp')
-rw-r--r--addons/document_ftp/ftpserver/abstracted_fs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/document_ftp/ftpserver/abstracted_fs.py b/addons/document_ftp/ftpserver/abstracted_fs.py
index 565f003dacd..39899f2087f 100644
--- a/addons/document_ftp/ftpserver/abstracted_fs.py
+++ b/addons/document_ftp/ftpserver/abstracted_fs.py
@@ -169,7 +169,10 @@ class abstracted_fs(object):
raise OSError(1, 'Operation not permited.')
# Reading operation
cr, node, rem = datacr
- res = node.open_data(cr, mode)
+ try:
+ res = node.open_data(cr, mode)
+ except TypeError, e:
+ raise IOError(errno.EINVAL, "No data")
return res
# ok, but need test more