Don’t use deprecated mktemp, use mkstemp instead

This commit is contained in:
Simon Cozens 2020-05-07 20:58:48 +01:00
parent 63df810c5e
commit 43cdc50e82

View File

@ -31,9 +31,9 @@ def usage():
def roundTrip(ttFile1, options, report): def roundTrip(ttFile1, options, report):
fn = os.path.basename(ttFile1) fn = os.path.basename(ttFile1)
xmlFile1 = tempfile.mktemp(".%s.ttx1" % fn) xmlFile1 = tempfile.mkstemp(".%s.ttx1" % fn)
ttFile2 = tempfile.mktemp(".%s" % fn) ttFile2 = tempfile.mkstemp(".%s" % fn)
xmlFile2 = tempfile.mktemp(".%s.ttx2" % fn) xmlFile2 = tempfile.mkstemp(".%s.ttx2" % fn)
try: try:
ttx.ttDump(ttFile1, xmlFile1, options) ttx.ttDump(ttFile1, xmlFile1, options)