mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Move StringIO import to use six for salt.netapi.rest_cherrypy.app.py
This commit is contained in:
parent
c6537a4ec6
commit
a5cb6d0dd5
@ -310,7 +310,6 @@ import itertools
|
||||
import functools
|
||||
import logging
|
||||
import json
|
||||
import StringIO
|
||||
import tarfile
|
||||
import time
|
||||
from multiprocessing import Process, Pipe
|
||||
@ -1414,10 +1413,10 @@ class Keys(LowDataAdapter):
|
||||
priv_key_file = tarfile.TarInfo('minion.pem')
|
||||
priv_key_file.size = len(priv_key)
|
||||
|
||||
fileobj = StringIO.StringIO()
|
||||
fileobj = six.StringIO.StringIO()
|
||||
tarball = tarfile.open(fileobj=fileobj, mode='w')
|
||||
tarball.addfile(pub_key_file, StringIO.StringIO(pub_key))
|
||||
tarball.addfile(priv_key_file, StringIO.StringIO(priv_key))
|
||||
tarball.addfile(pub_key_file, six.StringIO.StringIO(pub_key))
|
||||
tarball.addfile(priv_key_file, six.StringIO.StringIO(priv_key))
|
||||
tarball.close()
|
||||
|
||||
headers = cherrypy.response.headers
|
||||
|
Loading…
Reference in New Issue
Block a user