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