Commit 47e59872 authored by Jack Jansen's avatar Jack Jansen

Patch by Andrew Straw: use urllib2 so proxie access works.

parent f9e0bd8d
...@@ -15,6 +15,7 @@ intention is that the end user will use this through a GUI. ...@@ -15,6 +15,7 @@ intention is that the end user will use this through a GUI.
import sys import sys
import os import os
import urllib import urllib
import urllib2
import urlparse import urlparse
import plistlib import plistlib
import distutils.util import distutils.util
...@@ -49,11 +50,6 @@ ARCHIVE_FORMATS = [ ...@@ -49,11 +50,6 @@ ARCHIVE_FORMATS = [
(".zip", "unzip \"%s\""), (".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: class PimpPreferences:
"""Container for per-user preferences, such as the database to use """Container for per-user preferences, such as the database to use
and where to install packages.""" and where to install packages."""
...@@ -149,7 +145,7 @@ class PimpDatabase: ...@@ -149,7 +145,7 @@ class PimpDatabase:
if url in self._urllist: if url in self._urllist:
return return
self._urllist.append(url) self._urllist.append(url)
fp = MyURLopener().open(url).fp fp = urllib2.urlopen(url).fp
dict = plistlib.Plist.fromFile(fp) dict = plistlib.Plist.fromFile(fp)
# Test here for Pimp version, etc # Test here for Pimp version, etc
if not included: if not included:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment