By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,089 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,089 IT Pros & Developers. It's quick & easy.

Restoring override of urllib.URLopener.open_https

P: n/a
Hi,

the M2Crypto library overrides the urllib.URLopener.open_https method,
causing a urllib.urlopen to a https: server to fail in my
case. My python is not that strong, so is there a way to set
urllib.URLopener.open_https back to the original code? I prefer not to
modify M2Crypto.

Thanks,
Arno Bakker

Oct 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I think that you need a superclass above the M2Crypto one, and change
the open_https method back to the urllibs one.

Moi
Dolf

On Thu, 5 Oct 2006 15:09:22 GMT, Bakker A <ar**@cs.vu.nlwrote:
>Hi,

the M2Crypto library overrides the urllib.URLopener.open_https method,
causing a urllib.urlopen to a https: server to fail in my
case. My python is not that strong, so is there a way to set
urllib.URLopener.open_https back to the original code? I prefer not to
modify M2Crypto.

Thanks,
Arno Bakker
Oct 5 '06 #2

P: n/a
In article <16********************************@4ax.com>,
goyatlah <seresta At wanadoo Dot nlwrote:
>
I think that you need a superclass above the M2Crypto one, and change
the open_https method back to the urllibs one.
I'm not sure I get your suggestion. What the M2Crypto module does is:

import m2urllib

in its __init__.py, which blatantly does

from urllib import *
URLopener.open_https = open_https

in turn, so there's no subclassing going on, and AFAIK, the original urllib
code is irreversibly overwritten. Am I right?

Thanks,
Arno

Oct 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.