@simple_decorator
def recocommand(f):
    def newf(*args, **kargs):
        logging.basicConfig(level=logging.WARNING)
        start = time.clock()
        transaction.enter_transaction_management()
        transaction.managed(True)
        return_value = f(*args, **kargs)

        # In case somebody forgot to commit... wow...
        transaction.commit()
        transaction.leave_transaction_management()
        stop = time.clock()
        print('Command time: {0}'.format(stop - start))
        return return_value
    return newf
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/docutil/commands_util.py/recocommand/original