Merge pull request #1927 from simoncozens/no-mktemp

Don’t use deprecated mktemp, use mkstemp instead
This commit is contained in:
Cosimo Lupo 2020-05-11 11:10:10 +01:00 committed by GitHub
commit 798608b371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)