mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Switch open()
for salt.utils.fopen()
This commit is contained in:
parent
2a58c2fe18
commit
5f51444d66
@ -138,7 +138,7 @@ if not is_windows():
|
||||
if not os.path.exists(shim_file):
|
||||
# On esky builds we only have the .pyc file
|
||||
shim_file += "c"
|
||||
with open(shim_file) as ssh_py_shim:
|
||||
with salt.utils.fopen(shim_file) as ssh_py_shim:
|
||||
SSH_PY_SHIM = ssh_py_shim.read()
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -230,7 +230,7 @@ class SSH(object):
|
||||
)
|
||||
)
|
||||
pub = '{0}.pub'.format(priv)
|
||||
with open(pub, 'r') as fp_:
|
||||
with salt.utils.fopen(pub, 'r') as fp_:
|
||||
return '{0} rsa root@master'.format(fp_.read().split()[1])
|
||||
|
||||
def key_deploy(self, host, ret):
|
||||
|
Loading…
Reference in New Issue
Block a user