grr/server/grr_response_server/databases/mysql_utils.py
def Decorated(self, *args, **kw):
        """A function decorated by WithTransaction to receive a connection."""
        connection = kw.get("connection", None)
        if connection:
          return func(self, *args, **kw)

        def Closure(connection):
          new_kw = kw.copy()
          new_kw["connection"] = connection
          return func(self, *args, **new_kw)

        return self._RunInTransaction(Closure, readonly)
A function decorated by WithTransaction to receive a connection.
A function decorated by WithTransaction to receive a connection.
A function decorated by WithTransaction to receive a connection .
def Decorated(self, *args, **kw):
        connection = kw.get("connection", None)
        if connection:
          return func(self, *args, **kw)
        def Closure(connection):
          new_kw = kw.copy()
          new_kw["connection"] = connection
          return func(self, *args, **new_kw)
        return self._RunInTransaction(Closure, readonly)
def Decorated ( self , * args , ** kw ) : connection = kw . get ( "connection" , None ) if connection : return func ( self , * args , ** kw ) def Closure ( connection ) : new_kw = kw . copy ( ) new_kw [ "connection" ] = connection return func ( self , * args , ** new_kw ) return self . _RunInTransaction ( Closure , readonly )
A function decorated by WithTransaction to receive a connection.
A function decorated by WithTransaction to receive a connection .
"""A function decorated by WithTransaction to receive a connection."""
self