[Python-checkins] python/dist/src/Mac/Tools/IDE PackageManager.py,1.12,1.13

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Mon, 21 Jul 2003 15:03:17 -0700


Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory sc8-pr-cvs1:/tmp/cvs-serv18649

Modified Files:
	PackageManager.py 
Log Message:
Because plistlib doesn't catch all possible errors that can
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.


Index: PackageManager.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PackageManager.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** PackageManager.py	1 Jun 2003 20:03:43 -0000	1.12
--- PackageManager.py	21 Jul 2003 22:03:14 -0000	1.13
***************
*** 254,257 ****
--- 254,262 ----
  			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