def BasicTransactionHandler(application, factory):
    def basic_transaction(environ, start_response):
        conn = factory(environ)
        environ['paste.connection'] = conn
        should_commit = [500]
        def finalizer(exc_info=None):
            if exc_info:
                if isinstance(exc_info[1], HTTPException):
                    should_commit.append(exc_info[1].code)
            if should_commit.pop() < 400:
                conn.commit()
            else:
                try:
                    conn.rollback()
                except:
                    # TODO: check if rollback has already happened
                    return
            conn.close()
        def basictrans_start_response(status, headers, exc_info = None):
            should_commit.append(int(status.split(" ")[0]))
            return start_response(status, headers, exc_info)
        return catch_errors(application, environ, basictrans_start_response,
                            finalizer, finalizer)
    return basic_transaction
Set the horizontal spacing of the underyling control.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/transaction.py/BasicTransactionHandler--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_flow_area.py/QtFlowArea.set_horizontal_spacing