mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Lots of minor tweaks for the pep252 checkins, mainly because Qd
attributes are no longer supported.
This commit is contained in:
parent
202355a333
commit
362c7cd07b
25 changed files with 60 additions and 61 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue