mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Merge pull request #796 from kevinlondon/mktemp-removal
Replace mktemp with mkstemp
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user