summaryrefslogtreecommitdiff
path: root/addons/document_ftp/ftpserver
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-08-27 10:39:17 +0300
committerP. Christeas <p_christ@hol.gr>2010-08-27 10:39:17 +0300
commit283ea41e47e4481a8a0ddac7d70e098d984cabc5 (patch)
tree13065e64586fb2b769e7d6c3cb123e01b55524db /addons/document_ftp/ftpserver
parent2c1349111b1e823f2173e3023aa808c3472c9aa9 (diff)
doc ftp: enable ftp even before the module is fully installed.
This is marginally correct, but the document_ftp module would cause its own tests to fail (because it's not installed yet) and thus won't allow access to the db. Then, a 'tests.fatal' setting means that the module will never install successfully! Ideally, the tests should be performed *after* the db is inited and module is fully loaded. But the yaml mechanism performs them too early for us. bzr revid: p_christ@hol.gr-20100827073917-g6jwwskgpnnwl855
Diffstat (limited to 'addons/document_ftp/ftpserver')
-rw-r--r--addons/document_ftp/ftpserver/abstracted_fs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/document_ftp/ftpserver/abstracted_fs.py b/addons/document_ftp/ftpserver/abstracted_fs.py
index 00f308ff022..cd942c1c09d 100644
--- a/addons/document_ftp/ftpserver/abstracted_fs.py
+++ b/addons/document_ftp/ftpserver/abstracted_fs.py
@@ -74,7 +74,7 @@ class abstracted_fs(object):
if not cr.fetchone():
continue
- cr.execute("SELECT id FROM ir_module_module WHERE name = 'document_ftp' AND state IN ('installed', 'to upgrade') ")
+ cr.execute("SELECT id FROM ir_module_module WHERE name = 'document_ftp' AND state IN ('installed', 'to-install', 'to upgrade') ")
res = cr.fetchone()
if res and len(res):
self.db_name_list.append(db_name)
@@ -287,7 +287,7 @@ class abstracted_fs(object):
raise IOError(errno.EPERM, 'Cannot perform operation at root dir')
dbname = p_parts[0]
if dbname not in self.db_list():
- raise IOError(errno.ENOENT,'Invalid database path')
+ raise IOError(errno.ENOENT,'Invalid database path: %s' % dbname)
try:
db = pooler.get_db(dbname)
except Exception: