@contextmanager
def session_scope(session):
    try:
        yield session
        session.commit()
    except:
        session.rollback()
        raise
    finally:
        session.close()
Create a listening socket on the given hostname and port.
dataset/ETHPy150Open ottogroup/palladium/palladium/util.py/session_scope--crossover with--dataset/ETHPy150Open beetbox/beets/beets/util/bluelet.py/Listener.__init__