summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2001-07-05 07:03:16 (GMT)
committerJust van Rossum <just@letterror.com>2001-07-05 07:03:16 (GMT)
commit924e18e0b8d39a961e8d008ebcf3d43c9eee70db (patch)
treecabbdd3db73fbe4543085985df4811bd3934becc /Mac/Tools
parent0f9431fb180986767c58416b7c8fa3da66933802 (diff)
downloadcpython-924e18e0b8d39a961e8d008ebcf3d43c9eee70db.zip
cpython-924e18e0b8d39a961e8d008ebcf3d43c9eee70db.tar.gz
cpython-924e18e0b8d39a961e8d008ebcf3d43c9eee70db.tar.bz2
don't crash when encountering bad marshal data
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/IDE/MacPrefs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mac/Tools/IDE/MacPrefs.py b/Mac/Tools/IDE/MacPrefs.py
index f8888fc..b1fa7ca 100644
--- a/Mac/Tools/IDE/MacPrefs.py
+++ b/Mac/Tools/IDE/MacPrefs.py
@@ -50,7 +50,8 @@ class PrefFile(PrefObject):
self._prefsdict = {}
try:
prefdict = marshal.load(open(self.__path, 'rb'))
- except IOError:
+ except (IOError, ValueError):
+ # file not found, or currupt marshal data
pass
else:
for key, value in prefdict.items():