lib/fontcustom/scripts/generate.py in fontcustom-1.3.5.pre vs lib/fontcustom/scripts/generate.py in fontcustom-1.3.5

- old
+ new

@@ -45,17 +45,16 @@ # # Glyphs # def removeSwitchFromSvg( file ): - svgfile = open(file, 'r+') - tmpsvgfile = tempfile.NamedTemporaryFile(suffix=".svg", delete=False) + svgfile = open(file, 'r') svgtext = svgfile.read() - svgfile.seek(0) + svgfile.close() + tmpsvgfile = tempfile.NamedTemporaryFile(suffix=".svg", delete=False) svgtext = svgtext.replace('<switch>', '') svgtext = svgtext.replace('</switch>', '') tmpsvgfile.file.write(svgtext) - svgfile.close() tmpsvgfile.file.close() return tmpsvgfile.name def createGlyph( name, source, code ):