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: else:
prefdict[key] = value prefdict[key] = value
marshal.dump(prefdict, open(self.__path, 'wb')) marshal.dump(prefdict, open(self.__path, 'wb'))
fss = macfs.FSSpec(macfs.FSRef(self.__path)) try:
fss.SetCreatorType(self.__creator, 'pref') fss = macfs.FSSpec(macfs.FSRef(self.__path))
fss.SetCreatorType(self.__creator, 'pref')
except:
pass
def __getattr__(self, attr): def __getattr__(self, attr):
if attr == '__members__': if attr == '__members__':