Allura/allura/lib/helpers.py
def ming_config(**conf):
    """Temporarily swap in a new ming configuration, restoring the previous
    one when the contextmanager exits.

    :param \*\*conf: keyword arguments defining the new ming configuration

    """
    import ming
    from ming.session import Session
    datastores = Session._datastores
    try:
        ming.configure(**conf)
        yield
    finally:
        Session._datastores = datastores
        for name, session in Session._registry.iteritems():
            session.bind = datastores.get(name, None)
            session._name = name
Temporarily swap in a new ming configuration, restoring the previous
    one when the contextmanager exits.

    :param \*\*conf: keyword arguments defining the new ming configuration

    
Temporarily swap in a new ming configuration, restoring the previous
one when the contextmanager exits.
Temporarily swap in a new ming configuration restoring the previous one when the contextmanager exits .
def ming_config(**conf):
    import ming
    from ming.session import Session
    datastores = Session._datastores
    try:
        ming.configure(**conf)
        yield
    finally:
        Session._datastores = datastores
        for name, session in Session._registry.iteritems():
            session.bind = datastores.get(name, None)
            session._name = name
def ming_config ( ** conf ) : import ming from ming . session import Session datastores = Session . _datastores try : ming . configure ( ** conf ) yield finally : Session . _datastores = datastores for name , session in Session . _registry . iteritems ( ) : session . bind = datastores . get ( name , None ) session . _name = name
Temporarily swap in a new ming configuration, restoring the previous
one when the contextmanager exits.
Temporarily swap in a new ming configuration restoring the previous one when the contextmanager exits .
"""Temporarily swap in a new ming configuration, restoring the previous
    one when the contextmanager exits.

    :param \*\*conf: keyword arguments defining the new ming configuration

    """
\*\*conf
keyword arguments defining the new ming configuration
keyword arguments defining the new ming configuration