summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-10 14:19:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-10 14:19:14 (GMT)
commit26bf3acf42578c1d7798638f425d4d35b4cd807e (patch)
tree53c891c3d9c8cfa3d414318887e2b1e9eb8adcd9 /Lib/plat-mac
parent4f82a513ca1c99d763679a4d9a27ff6d2404ed88 (diff)
downloadcpython-26bf3acf42578c1d7798638f425d4d35b4cd807e.zip
cpython-26bf3acf42578c1d7798638f425d4d35b4cd807e.tar.gz
cpython-26bf3acf42578c1d7798638f425d4d35b4cd807e.tar.bz2
- Better exception when the database isn't found.
- Allow for "manual:" pseudo-scheme in downloadURL to signal that the download should be done manually.
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/pimp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py
index cb3a058..e91e75b 100644
--- a/Lib/plat-mac/pimp.py
+++ b/Lib/plat-mac/pimp.py
@@ -104,7 +104,7 @@ class PimpDatabase:
if url in self._urllist:
return
self._urllist.append(url)
- fp = urllib.urlopen(url).fp
+ fp = MyURLopener().open(url).fp
dict = plistlib.Plist.fromFile(fp)
# Test here for Pimp version, etc
if not included:
@@ -299,6 +299,8 @@ class PimpPackage:
filename = os.path.split(path)[1]
self.archiveFilename = os.path.join(self._db.preferences.downloadDir, filename)
if not self._archiveOK():
+ if scheme == 'manual':
+ return "Please download package manually and save as %s" % self.archiveFilename
if self._cmd(output, self._db.preferences.downloadDir,
"curl",
"--output", self.archiveFilename,