[PATCH] Handle out-of-bounds dates

Cameron Simpson cs at zip.com.au
Sat Aug 29 22:23:03 BST 2015


On 29Aug2015 16:02, Name Removed <removed at example.com> wrote:
>On Sat, Aug 29, 2015 at 11:24:57AM +0200, Nicolas Sebrecht wrote:
>>On Sat, Aug 29, 2015 at 12:48:20AM -0700, OfflineIMAP mailing list wrote:
>>>>+ date = emailutil.get_message_date(content, 'Date')
>>>>+ if date != None:
>>
>>>   Please, use "is not".
>
>OK

Thanks.

>>>>+ except:
>>>Please warn about the exception and the date causing it.
>
>Not sure what you want... I already put the offending date in the
>ui.warn() line, but I guess I could put the actual exception message
>there too.

Thanks. It is almost always useful. Supposing the date were ok but a filesystem 
issue broke the os.utime? You can see where I'm going here...

Cheers,
Cameron Simpson <cs at zip.com.au>




More information about the OfflineIMAP-project mailing list