Skip to content

Commit

Permalink
Better autotag debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Dec 27, 2013
1 parent 94196c2 commit 7030f28
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mailpile/plugins/autotag.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,15 @@ def filter_hook(session, msg_mid, msg, keywords):
want, info = atagger.should_tag(at_config, msg, keywords)
if want is True:
if 'autotag' in config.sys.debug:
session.ui.debug(('Autotagging %s with %s (want=%.3f)'
) % (msg_mid, at_tag.name, want))
session.ui.debug(('Autotagging %s with %s (w=%s, i=%s)'
) % (msg_mid, at_tag.name, want, info))
keywords.add('%s:tag' % at_tag._key)
elif at_config.unsure_tag and want is None:
unsure_tag = config.get_tag(at_config.unsure_tag)
if 'autotag' in config.sys.debug:
session.ui.debug(('Autotagging %s with %s (want=%.3f)'
) % (msg_mid, unsure_tag.name, want))
session.ui.debug(('Autotagging %s with %s (w=%s, i=%s)'
) % (msg_mid, unsure_tag.name,
want, info))
keywords.add('%s:tag' % unsure_tag._key)
except (KeyError, AttributeError, ValueError):
pass
Expand Down

0 comments on commit 7030f28

Please sign in to comment.