From: Jack Jansen Date: Fri, 13 Dec 2002 23:32:51 +0000 (+0000) Subject: Sigh: the Jaguar workaround for the prefs file broke saving it on OS9. Temporary... X-Git-Tag: v2.3c1~3016 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19ac481a2cfb46a56c4959e414afa30cfad7073d;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Mac/Tools/IDE/MacPrefs.py b/Mac/Tools/IDE/MacPrefs.py index 716c828c33c8..6c7c553a830e 100644 --- a/Mac/Tools/IDE/MacPrefs.py +++ b/Mac/Tools/IDE/MacPrefs.py @@ -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__':