Example #1
0
File: TM.py Project: eaudeweb/naaya
 def _register(self):
     TM._register(self)
     # XXX Make sure we are called before the
     # persistent ExtFile object is destroyed.
     t = transaction.get()
     if hasattr(t, '_resources'):
         r = t._resources.pop()
         t._resources.insert(0, r)
Example #2
0
def tr():
    t = transaction.get()
    if hasattr(t, '_objects'):
        return t._objects   # ZODB <= 3.2
    elif hasattr(t, '_resources'):
        return t._resources # ZODB >= 3.4