Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

            def wrapper(*args, **kwargs):
        logger = logging.getLogger('karesansui.db.access')
        session = args[0]
        model = args[1]
        model_name = get_model_name(model)
        model_id = model.id
        try:
            func(*args, **kwargs)
        except UnmappedInstanceError, ui:
            logger.error(('Data to update is failed, '
                          'Invalid value was inputed '
                          '- %s=%s, error=%s') % (model_name, model_id, ''.join(ui)))
            raise KaresansuiDBException(('Data to update is failed, '
                          'Invalid value was inputed. '
                          '- %s=%s, error=%s') % (model_name, model_id, ''.join(ui)))
        
        num = len(session.dirty)
        if not num:
            logger.warn('Data has not been changed. - %s=%s' %  (model_name, model_id))
            return num  # The return value assume zero
        
        logger.debug('Data to update is succeeded. - %s=%s' % (model_name, model_id))
        return num
        


src/k/a/karesansui-HEAD/karesansui/gadget/hostby1watchby1.py   karesansui(Download)
    CHECK_LENGTH, CHECK_MIN, CHECK_MAX
 
from karesansui.db.access.watch import \
    findby1 as w_findby1, \
    logical_delete as w_delete, \
        watch.is_okay_mail          = bool_values.get("enable_okay_mail")
 
        w_update(self.orm, watch)
 
        plugin = watch.plugin