Skip to content

Commit 4705e84

Browse files
authored
Do not use deprecated template variable in tempfile module (untitaker#45)
* Do not use deprecated template variable in tempfile module Use gettempprefix() instead, as suggested by the documentation. * fix: Styling Co-authored-by: Markus Unterwaditzer <markus@unterwaditzer.net>
2 parents 55eed75 + 7930174 commit 4705e84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

atomicwrites/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ def _open(self, get_fileobject):
165165
except Exception:
166166
pass
167167

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

0 commit comments

Comments
 (0)