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 <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9