On Tuesday 21 March 2006 10:24, Oleg Broytmann wrote: > > for i in xrange(100): > > print i > > > > try: > > agg = Aggregates.select(connection = t, forUpdate = > > True).getOne() > > except: > > agg = Aggregates(total = 0, connection = t) > > I have a problem converting the test to SQLObject. In the beginning the > test database is always empty so .select() always raises a "not found" > exception. ... which is caught by the "except:", and then a row is created by that Aggregates constructor, isn't it? I must be misunderstanding the issue. Do you mean that it creates trouble when two instances of the script are running in parallel? It is true that I always ran it once first, to create the row. This probably means that there should be some initialization code ran first.
-- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECTED] KDE/KOffice developer, Qt consultancy projects Klarälvdalens Datakonsult AB, Platform-independent software solutions ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
