entities/sources.py
changeset 8483 4ba11607d84a
parent 8068 72210779ff6d
child 8900 010a59e12d89
equal deleted inserted replaced
8469:82272decfa99 8483:4ba11607d84a
    49             except OptionError:
    49             except OptionError:
    50                 if skip_unknown:
    50                 if skip_unknown:
    51                     continue
    51                     continue
    52                 raise
    52                 raise
    53         cfgstr = unicode(generate_source_config(sconfig), self._cw.encoding)
    53         cfgstr = unicode(generate_source_config(sconfig), self._cw.encoding)
    54         self.set_attributes(config=cfgstr)
    54         self.cw_set(config=cfgstr)
    55 
    55 
    56 
    56 
    57 class CWSource(_CWSourceCfgMixIn, AnyEntity):
    57 class CWSource(_CWSourceCfgMixIn, AnyEntity):
    58     __regid__ = 'CWSource'
    58     __regid__ = 'CWSource'
    59     fetch_attrs, cw_fetch_order = fetch_config(['name', 'type'])
    59     fetch_attrs, cw_fetch_order = fetch_config(['name', 'type'])
   179         self._logs.append(encodedmsg)
   179         self._logs.append(encodedmsg)
   180 
   180 
   181     def write_log(self, session, **kwargs):
   181     def write_log(self, session, **kwargs):
   182         if 'status' not in kwargs:
   182         if 'status' not in kwargs:
   183             kwargs['status'] = getattr(self, '_status', u'success')
   183             kwargs['status'] = getattr(self, '_status', u'success')
   184         self.set_attributes(log=u'<br/>'.join(self._logs), **kwargs)
   184         self.cw_set(log=u'<br/>'.join(self._logs), **kwargs)
   185         self._logs = []
   185         self._logs = []