]> granicus.if.org Git - python/commitdiff
Because plistlib doesn't catch all possible errors that can
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 21 Jul 2003 22:03:14 +0000 (22:03 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 21 Jul 2003 22:03:14 +0000 (22:03 +0000)
happen while parsing a plistfile feeding an ill-formatted file to
pimp may cause an exception. As a stopgap we use an unqualified except
and print an error message "Unspecified error, probably ill-formatted
database". Fixes #765621.

Mac/Tools/IDE/PackageManager.py

index eee5b0aa6c2798006f18775ee610308d8343cb88..27cd2398f110f2defae8dc150aa00c6333ef3b29 100755 (executable)
@@ -253,6 +253,11 @@ class PimpInterface:
                        rv = "Cannot open %s: %s\n" % (url, arg)
                        rv += "\nSee MacPython Package Manager help page."
                        return rv
+               except:
+                       rv = "Unspecified error while parsing database: %s\n" % url
+                       rv += "Usually, this means the database is not correctly formatted.\n"
+                       rv += "\nSee MacPython Package Manager help page."
+                       return rv
                # Check whether we can write the installation directory.
                # If not, set to the per-user directory, possibly
                # creating it, if needed.