Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Do not use deprecated template variable in tempfile module
Browse files Browse the repository at this point in the history
Use gettempprefix() instead, as suggested by the documentation.
  • Loading branch information
ret2libc committed Mar 6, 2020
1 parent b37f12f commit 866a27e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atomicwrites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _open(self, get_fileobject):
except Exception:
pass

def get_fileobject(self, suffix="", prefix=tempfile.template, dir=None,
def get_fileobject(self, suffix="", prefix=tempfile.gettempprefix(), dir=None,
**kwargs):
'''Return the temporary file to use.'''
if dir is None:
Expand Down

0 comments on commit 866a27e

Please sign in to comment.