]> granicus.if.org Git - python/commitdiff
- Better exception when the database isn't found.
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 10 Feb 2003 14:19:14 +0000 (14:19 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 10 Feb 2003 14:19:14 +0000 (14:19 +0000)
- Allow for "manual:" pseudo-scheme in downloadURL to signal that
  the download should be done manually.

Lib/plat-mac/pimp.py

index cb3a058bd1be96827276ed8d39ae919f60c4b3f9..e91e75b0ce96788bfc776747b54445cea0f39914 100644 (file)
@@ -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,