Hi, I have here two Python modules (see attached), where newsparser.py defines (among other things) an object SoupReader and an exception PageNotAvailable. This object (or its children) is then periodically created in a loop in reprocess.py.
Now, my question is concerned with the use of exception in SoupReader.suck. The idea is that when the page is not available for download, whole object goes up in flames, the rest of SoapReader.__init__ is skipped over, and the exception is then caught in reprocess.py cycle, which makes a note in some errorlog, that this particular page has not been downloaded, but otherwise the script continues for other pages. Is it what I am doing here or did I missed the idea of exceptions at all? Thanks for any answer, Matej -- Matej Cepl, http://www.ceplovi.cz/matej/blog/ GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC I used to date a woman who did PR and marketing for MS, so you can imagine we had some in-depth and sometimes heated discussions about MS vs. Linux and Macs. Well, one day we were going hiking, and she presented me with a really nice backback. The only issue with it was that it had the MS logo emblazoned all over it. Of course, she knew I wouldn't refuse it. Anyway, she said to me, "Isn't that nice? See? What'd RedHat ever give you for free?" I replied, "An operating system." That was one long, quiet hike. -- disserto on Slashdot http://slashdot.org/comments.pl\ ?sid=138492&tid=109&mode=thread&cid=11590292
newsparser.py
Description: application/python
reprocess.py
Description: application/python
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor