[ufoLib] rename deprecated fs.setbytes -> writebytes
Follow up of #1445 Fixes #1424
This commit is contained in:
parent
f47fee933c
commit
42ab9aba57
@ -175,7 +175,7 @@ class _UFOBaseIO(object):
|
||||
)
|
||||
if self.fs.exists(fileName) and data == self.fs.readbytes(fileName):
|
||||
return
|
||||
self.fs.setbytes(fileName, data)
|
||||
self.fs.writebytes(fileName, data)
|
||||
else:
|
||||
with self.fs.openbin(fileName, mode="w") as fp:
|
||||
try:
|
||||
@ -1009,12 +1009,12 @@ class UFOWriter(UFOReader):
|
||||
if self.fs.isfile(path) and data == self.fs.readbytes(path):
|
||||
return
|
||||
try:
|
||||
self.fs.setbytes(path, data)
|
||||
self.fs.writebytes(path, data)
|
||||
except fs.errors.FileExpected:
|
||||
raise UFOLibError("A directory exists at '%s'" % path)
|
||||
except fs.errors.ResourceNotFound:
|
||||
self.fs.makedirs(fs.path.dirname(path), recreate=True)
|
||||
self.fs.setbytes(path, data)
|
||||
self.fs.writebytes(path, data)
|
||||
|
||||
def getFileObjectForPath(self, path, mode="w", encoding=None):
|
||||
"""
|
||||
|
@ -423,7 +423,7 @@ class GlyphSet(_UFOBaseIO):
|
||||
and data == self.fs.readbytes(fileName)
|
||||
):
|
||||
return
|
||||
self.fs.setbytes(fileName, data)
|
||||
self.fs.writebytes(fileName, data)
|
||||
|
||||
def deleteGlyph(self, glyphName):
|
||||
"""Permanently delete the glyph from the glyph set on disk. Will
|
||||
|
Loading…
x
Reference in New Issue
Block a user