Document FTP: don't touch the databases, on db_list

Trying a login on each db listed would result in the database loaded by
the pooler. This behaviour is not really welcome.
However, some clients (like kio_ftp) may still want to descend into the
databases listed, in which case we cannot avoid to load the db(s).

bzr revid: p_christ@hol.gr-20100629140328-2kqlfpo3oyhu0ufi
This commit is contained in:
P. Christeas 2010-06-29 17:03:28 +03:00
parent ad31f812bc
commit d835a1419b
1 changed files with 5 additions and 4 deletions

View File

@ -428,6 +428,7 @@ class abstracted_fs:
cr.close()
raise
if not uid:
cr.close()
raise OSError(2, 'Authentification Required.')
return cr, uid, pool
@ -445,10 +446,10 @@ class abstracted_fs:
result = []
for db in self.db_list():
try:
uid = security.login(db, self.username, self.password)
if uid:
result.append(false_node(db))
except osv.except_osv:
result.append(false_node(db))
except osv.except_osv:
import traceback
traceback.print_exc()
pass
return result
cr = pooler.get_db(path.context.dbname).cursor()