don't crash when encountering bad marshal data
This commit is contained in:
parent
0f9431fb18
commit
924e18e0b8
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue