本文整理匯總了Python中fuglu.shared.Suspect.is_modified方法的典型用法代碼示例。如果您正苦於以下問題:Python Suspect.is_modified方法的具體用法?Python Suspect.is_modified怎麽用?Python Suspect.is_modified使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類fuglu.shared.Suspect
的用法示例。
在下文中一共展示了Suspect.is_modified方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: type
# 需要導入模塊: from fuglu.shared import Suspect [as 別名]
# 或者: from fuglu.shared.Suspect import is_modified [as 別名]
message = ""
if type(ans) is tuple:
result, message = ans
else:
result = ans
if result == None:
result = DUNNO
logging.info("Result: %s %s", actioncode_to_string(result), message)
suspect.tags['decisions'].append((pluginstance.section, result))
logging.info(suspect)
for pluginstance in mc.appenders:
logging.info("*** Running appender: %s ***" % pluginstance)
pluginstance.process(suspect, DUNNO)
message = ""
logging.info(suspect)
if suspect.is_modified():
outfilename = '/tmp/fuglu_dummy_message_out.eml'
out = open(outfilename, 'wb')
out.write(suspect.get_source())
out.close()
logging.info(
"Plugin modified the source -> modified message available as %s" % outfilename)
if opts.console:
run_debugconsole(
suspect=suspect, plugin=pluginstance, result=result, config=config, prependers=mc.prependers, scanners=scannerlist, appenders=mc.appenders)