I am seeing an odd problem on the backend portion of a TurboGears
application I am working on. Its not really TurboGears specific --
its SQLObject really, but I figured someone here might have seen this
problem before :)
Basically, I am using the following decorator for running something
in a transaction:
def transaction(func):
def func_proxy(*args, **kwargs):
old_conn = sqlhub.getConnection()
conn = old_conn.transaction()
sqlhub.processConnection = conn
try:
try:
value = func(*args, **kwargs)
except:
conn.rollback()
raise
else:
conn.commit()
return value
finally:
sqlhub.processConnection = old_conn
func_proxy.func_name = func.func_name
return func_proxy
Now, I am processing a bunch of text files inside a method that is
decorated with this decorator, and if I let it run long enough, I see
the message constantly printing out:
Exception exceptions.RuntimeError: 'maximum recursion depth
exceeded'
in <bound method Transaction.__del__ of
<sqlobject.dbconnection.Transaction object at 0x78efb0>> ignored
Any ideas why this is happening? It seems like it might be an error
in SQLObject.
--
Jonathan LaCour
http://cleverdevil.org