summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Schirone <sirmy15@gmail.com>2020-03-06 10:59:20 +0100
committerRiccardo Schirone <sirmy15@gmail.com>2020-03-06 10:59:20 +0100
commit866a27e9054a153d560ad0706da5ab0f0b19d8a2 (patch)
treebd0ebe2d13425dfdb2da55f7e54bb36759a5bc9b
parentb37f12f17a7c5bd376ae895451ee683fbdb5ceeb (diff)
downloadatomicwrites-866a27e9054a153d560ad0706da5ab0f0b19d8a2.tar.gz
Do not use deprecated template variable in tempfile module
Use gettempprefix() instead, as suggested by the documentation.
-rw-r--r--atomicwrites/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/atomicwrites/__init__.py b/atomicwrites/__init__.py
index cfa5c29..b342db6 100644
--- a/atomicwrites/__init__.py
+++ b/atomicwrites/__init__.py
@@ -165,7 +165,7 @@ class AtomicWriter(object):
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: