Skip to content

Commit 866a27e

Browse files
committed
Do not use deprecated template variable in tempfile module
Use gettempprefix() instead, as suggested by the documentation.
1 parent b37f12f commit 866a27e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

atomicwrites/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def _open(self, get_fileobject):
165165
except Exception:
166166
pass
167167

168-
def get_fileobject(self, suffix="", prefix=tempfile.template, dir=None,
168+
def get_fileobject(self, suffix="", prefix=tempfile.gettempprefix(), dir=None,
169169
**kwargs):
170170
'''Return the temporary file to use.'''
171171
if dir is None:

0 commit comments

Comments
 (0)