This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author garrettzilla
Recipients garrettzilla
Date 2016-10-18.22:39:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za>
In-reply-to
Content
Using Claws Mail, and mailbox.MH crashes on two different conditions:

1) sequence spans lines, suchly:
unseen: 1-222 225-300
990-1024 1048-2048

Not Pythonic, but I fixed it with this update:

    def get_sequences(self):
        """Return a name-to-key-list dictionary to define each sequence."""
        results = {}
        with open(os.path.join(self._path, '.mh_sequences'), 'r', encoding='ASCII') as f:
            all_keys = set(self.keys())
            for line in f:
                try:
                    if line.count(':') == 0:
                        contents = line
                    else:
                        name, contents = line.split(':')
                        keys = set()
                    for spec in contents.split():
                        if spec.isdigit():
                            keys.add(int(spec))



2) Sequence spec appears to be open-ended on the front:
 28119-28123 28127 28129 28131 28133-28142 28144-28154 28156-28172 28174-28189 28191-28204 28206-28218 28220-28224 28226 28228-28234 28237-28239
 28119-28123 28127 28129 28131 28133-28142 28144-28154 28156-28163
 28119-28123 28127 28129 28131 28133-28157
-27920 27923-27945 27947

I'm not sure how to interpret this, so just put in a kludgy fix to get my script running as a workaround (not using sequences).

Would also be interested in an option to open a mailbox and process while ignoring sequences.
History
Date User Action Args
2016-10-18 22:39:26garrettzillasetrecipients: + garrettzilla
2016-10-18 22:39:26garrettzillasetmessageid: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za>
2016-10-18 22:39:26garrettzillalinkissue28473 messages
2016-10-18 22:39:26garrettzillacreate