[Mailman-Users] bin/arch : ctime

Mark Sapiro mark at msapiro.net
Fri Oct 9 01:28:39 CEST 2009


Rob Lingelbach wrote:
>
>On Oct 8, 2009, at 8:11 PM, Mark Sapiro wrote:
>
>> Mark Sapiro wrote:
>>>
>>> This script
>>>
>>> -----------------------------------------------------------------------
>> [...]
>>>           try:
>>>               ptime = time.strptime(mo.group(1),
>>>                                     '%a %b %d %H:%M:%S %Z %Y')
>>>           except ValueError:
>>>               next
>> [...]
>>
>>
>> Ooops. That should be
>>
>>            except ValueError:
>>                continue
>
>funny thing is, it worked, on a very minimal directory that I just ran  
>a test on:


It will work as long as it doesn't hit a "<I>...</I>" line that doesn't
contain a date matching the '%a %b %d %H:%M:%S %Z %Y' format. In fact,
that is one of those things that won't happen as long as the message
files are all "well formed", but is there in order to keep looking in
case it does.

Python doesn't care that the name 'next' is undefined until it actually
tries to execute it.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list