Passing a CookieJar instead of a cookieproc to urllib2.build_opener

rrenaud at rrenaud at
Tue Jul 10 02:45:31 CEST 2007

urllib2.build_opener happily accepts and ignores a FileCookieJar.    I
had a bug in my code which looked like


which should have been


The problem is that the code ran happily without actually sending the
cookie, the CookieJar was just ignored.  I think that build_opener
should throw an exception when add_handler doesn't actually add.

Is this worth filing a bug for, or is it acceptable behavior?

More information about the Python-list mailing list