mathGlyph -> PointToSegmentPen -> drawPoints -> pointPen -> beginPath
gets an ‘identifier’ argument from the ufo3 drawPoints. Which trips an
error. This alleviates the problem but does not address anything that
beginPath should be doing with the identifier.
All cases where UFOReader._readPlist was used suffered
from calling it with the fully constructed path where
it expected just the relative path/fileName of the plist.
Also, all cases had the similiar pattern of checking if
the file exists before trying to read it.
This replaces that pattern by `_getPlist`. The method has
a `default` argument that acts similar to the `default`
argument of the builtin function `getattr` i.e. when
`default is None` the requested plist is mandatory.
Maybe we should rather replace it with os.path.exists, as this
would make the code easier to read. Also os.path.exists is already
used very often in ufoLib.__init__
`UFOWriter._writePlist` constructs the full path to the file to be written;
but the calling code did so, too.
This reliefs the calling code of `UFOWriter._writePlist` from knowing
how to construct the full path and thus makes the code more DRY.
Also, this fixes the faulty behavior that was caused by the double
path construction.
A further new helper `UFOWriter._deleteFile` was added to fully enable the
removal of path construction in the callers.
All cases where UFOReader._readPlist was used suffered
from calling it with the fully constructed path where
it expected just the relative path/fileName of the plist.
Also, all cases had the similiar pattern of checking if
the file exists before trying to read it.
This replaces that pattern by `_getPlist`. The method has
a `default` argument that acts similar to the `default`
argument of the builtin function `getattr` i.e. when
`default is None` the requested plist is mandatory.
Maybe we should rather replace it with os.path.exists, as this
would make the code easier to read. Also os.path.exists is already
used very often in ufoLib.__init__