From 283ea41e47e4481a8a0ddac7d70e098d984cabc5 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Fri, 27 Aug 2010 10:39:17 +0300 Subject: [PATCH] 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 --- addons/document_ftp/ftpserver/abstracted_fs.py | 4 ++-- 1 file 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: