On 10/07/10 12:53 +0200, Ralf Peschke wrote:
> I think this lines in database.py Cursor.test()
>    367                 "'ir_module_module_dependency, '"
>    368                 "'ir_translation, '"
> should be changed to
>    367                 "'ir_module_module_dependency', "
>    368                 "'ir_translation', "

Fixed with changeset d1bddcf64ea7

The strange thing is that the query on my PostgreSQL version 8.4.2 is valid.
Indeed it makes a concat of the two strings without ',' separator.
Which version have you?

> And to avoid the problem I had, tryton not showing even my own
> databases, perhaps we should catch the (possible) exception in
> Database.list()
>    newline         try:
>    197                 if cursor2.test():
>    198                     res.append(db_name)
>    199                     cursor2.close(close=True)
>    200                 else:
>    201                     cursor2.close(close=True)
>    202                     database.close()
>    newline         exception Exception:
>    newline             database.close()
>    newline             continue
> 
> Only thing I don't understand: why tryton don't throw always an
> exception on the wrong SQL-syntax?

I don't like to much to catch exception on query that should never failed.
And perhaps if we had this try/except, you did not find the issue :-)

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpJmdsHsQyGZ.pgp
Description: PGP signature

Reply via email to