diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-11 14:37:19 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-11 14:37:19 (GMT) |
commit | 47e5987256e6faf99bc8e474fd8351aa39808785 (patch) | |
tree | bcf3f328a0c25081fac8ede903a978bec1ab1ca9 /Lib/plat-mac | |
parent | f9e0bd8df8ef25d67b407bee1b1dcbac97be36db (diff) | |
download | cpython-47e5987256e6faf99bc8e474fd8351aa39808785.zip cpython-47e5987256e6faf99bc8e474fd8351aa39808785.tar.gz cpython-47e5987256e6faf99bc8e474fd8351aa39808785.tar.bz2 |
Patch by Andrew Straw: use urllib2 so proxie access works.
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r-- | Lib/plat-mac/pimp.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py index c5cf45e..426177a 100644 --- a/Lib/plat-mac/pimp.py +++ b/Lib/plat-mac/pimp.py @@ -15,6 +15,7 @@ intention is that the end user will use this through a GUI. import sys import os import urllib +import urllib2 import urlparse import plistlib import distutils.util @@ -49,11 +50,6 @@ ARCHIVE_FORMATS = [ (".zip", "unzip \"%s\""), ] -class MyURLopener(urllib.FancyURLopener): - """Like FancyURLOpener, but we do want to get errors as exceptions.""" - def http_error_default(self, url, fp, errcode, errmsg, headers): - urllib.URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) - class PimpPreferences: """Container for per-user preferences, such as the database to use and where to install packages.""" @@ -149,7 +145,7 @@ class PimpDatabase: if url in self._urllist: return self._urllist.append(url) - fp = MyURLopener().open(url).fp + fp = urllib2.urlopen(url).fp dict = plistlib.Plist.fromFile(fp) # Test here for Pimp version, etc if not included: @@ -798,4 +794,4 @@ def main(): if __name__ == '__main__': main() -
\ No newline at end of file + |