Merge pull request #796 from kevinlondon/mktemp-removal

Replace mktemp with mkstemp
This commit is contained in:
James Kasten 2015-09-21 18:57:20 -04:00
commit e144a88a27

View file

@ -288,12 +288,12 @@ class Revoker(object):
:class:`letsencrypt.revoker.Cert`
"""
list_path2 = tempfile.mktemp(".tmp", "LIST")
newfile_handle, list_path2 = tempfile.mkstemp(".tmp", "LIST")
idx = 0
with open(self.list_path, "rb") as orgfile:
csvreader = csv.reader(orgfile)
with open(list_path2, "wb") as newfile:
with os.fdopen(newfile_handle, "wb") as newfile:
csvwriter = csv.writer(newfile)
for row in csvreader: