MetricsGrimoire / MailingListStats

Mailing List Stats is a command line based tool used to analyze mboxes
http://metricsgrimoire.github.com/MailingListStats/
GNU General Public License v2.0
38 stars 25 forks source link

Extend parsed but not stored message #41

Closed andygrunwald closed 10 years ago

andygrunwald commented 10 years ago

During parsing a TYPO3 mailing list some messages occurred:

...
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2003-December.txt.gz
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-January.txt.gz
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-February.txt.gz
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-March.txt.gz
   ***WARNING: 8 messages (out of 496) parsed but not stored***
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-April.txt.gz
   ***WARNING: 8 messages (out of 732) parsed but not stored***
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-May.txt.gz
   ***WARNING: 33 messages (out of 770) parsed but not stored***
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-June.txt.gz
   ***WARNING: 8 messages (out of 739) parsed but not stored***
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-July.txt.gz
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-August.txt.gz
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-September.txt.gz
...

At this time i asked me "Why does this messages not stored?"

So i added a reason to the error message. The message now looks like:

...
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-February.txt.gz
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-March.txt.gz
   ***WARNING: 8 messages (out of 496) parsed but not stored (8 duplicate, 0 runtime error)***
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-April.txt.gz
   ***WARNING: 8 messages (out of 732) parsed but not stored (8 duplicate, 0 runtime error)***
Analyzing /home/vagrant/.mlstats/compressed/lists.typo3.org/pipermail/typo3-dev/2004-May.txt.gz
...
gpoo commented 10 years ago

Just niptick: I would say 'errors' instead of 'runtime errors'. Also, there is a typo in the commit message (varialble).

andygrunwald commented 10 years ago

I've updated and rebased this PR (to the latest sqlalchemy changes). Also i`ve corrected your comment.

@gpoo can you have a look at it again?

andygrunwald commented 10 years ago

Hey @gpoo, i changed the magic numbers to constants. Is this change fine for you or do you suggest another solution?

andygrunwald commented 10 years ago

After a small mail conversation with @gpoo and @sduenas i will accept this change. If something will break, ping me and i will rollback it.