Sigh: the Jaguar workaround for the prefs file broke saving it on OS9. Temporary workaround is to ignore the exception (it's only about file creator/type anyway).

This commit is contained in:
Jack Jansen 2002-12-13 23:32:51 +00:00
parent 9937a04994
commit 19ac481a2c
1 changed files with 5 additions and 2 deletions

View File

@ -70,8 +70,11 @@ class PrefFile(PrefObject):
else:
prefdict[key] = value
marshal.dump(prefdict, open(self.__path, 'wb'))
fss = macfs.FSSpec(macfs.FSRef(self.__path))
fss.SetCreatorType(self.__creator, 'pref')
try:
fss = macfs.FSSpec(macfs.FSRef(self.__path))
fss.SetCreatorType(self.__creator, 'pref')
except:
pass
def __getattr__(self, attr):
if attr == '__members__':