mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
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:
parent
9937a04994
commit
19ac481a2c
1 changed files with 5 additions and 2 deletions
|
@ -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__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue