Create temp file in directory where ssh key lives
This commit is contained in:
parent
4bce10c303
commit
f70fcf6abb
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ def readkeys(filename):
|
|||
|
||||
def writekeys(module, filename, keys):
|
||||
|
||||
fd, tmp_path = tempfile.mkstemp()
|
||||
fd, tmp_path = tempfile.mkstemp('', 'tmp', os.path.dirname(filename))
|
||||
f = open(tmp_path,"w")
|
||||
try:
|
||||
f.writelines( (key + "\n" for key in keys) )
|
||||
|
|
Loading…
Reference in a new issue