diff options
author | Just van Rossum <just@letterror.com> | 2001-07-05 07:03:16 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2001-07-05 07:03:16 (GMT) |
commit | 924e18e0b8d39a961e8d008ebcf3d43c9eee70db (patch) | |
tree | cabbdd3db73fbe4543085985df4811bd3934becc /Mac/Tools | |
parent | 0f9431fb180986767c58416b7c8fa3da66933802 (diff) | |
download | cpython-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.py | 3 |
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(): |