Lots of minor tweaks for the pep252 checkins, mainly because Qd

attributes are no longer supported.
This commit is contained in:
Jack Jansen 2002-11-30 00:01:29 +00:00
parent 202355a333
commit 362c7cd07b
25 changed files with 60 additions and 61 deletions

View file

@ -70,7 +70,7 @@ class PrefFile(PrefObject):
else:
prefdict[key] = value
marshal.dump(prefdict, open(self.__path, 'wb'))
fss = macfs.FSSpec(self.__path)
fss = macfs.FSSpec(macfs.FSRef(self.__path))
fss.SetCreatorType(self.__creator, 'pref')
def __getattr__(self, attr):
@ -97,7 +97,7 @@ def GetPrefs(prefname, creator = 'Pyth'):
# Find the preferences folder and our prefs file, create if needed.
vrefnum, dirid = macfs.FindFolder(kOnSystemDisk, 'pref', 0)
prefsfolder_fss = macfs.FSSpec((vrefnum, dirid, ''))
prefsfolder = prefsfolder_fss.as_pathname()
prefsfolder = macfs.FSRef(prefsfolder_fss).as_fsspec().as_pathname()
path = os.path.join(prefsfolder, prefname)
head, tail = os.path.split(path)
# make sure the folder(s) exist