mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Fix poor merge-conflict resolution: "translate_new_lines" doesn't exist in develop.
This commit is contained in:
parent
1ad8ed89ac
commit
b67e86e11b
@ -218,6 +218,7 @@ from subprocess import Popen, PIPE
|
||||
# Import salt libs
|
||||
import salt.utils.path
|
||||
import salt.utils.stringio
|
||||
import salt.utils.stringutils
|
||||
import salt.syspaths
|
||||
from salt.exceptions import SaltRenderError
|
||||
|
||||
@ -269,12 +270,11 @@ def _decrypt_ciphertext(cipher):
|
||||
the cipher and return the decrypted string. If the cipher cannot be
|
||||
decrypted, log the error, and return the ciphertext back out.
|
||||
'''
|
||||
if translate_newlines:
|
||||
try:
|
||||
cipher = salt.utils.stringutils.to_unicode(cipher).replace(r'\n', '\n')
|
||||
except UnicodeDecodeError:
|
||||
# ciphertext is binary
|
||||
pass
|
||||
try:
|
||||
cipher = salt.utils.stringutils.to_unicode(cipher).replace(r'\n', '\n')
|
||||
except UnicodeDecodeError:
|
||||
# ciphertext is binary
|
||||
pass
|
||||
cipher = salt.utils.stringutils.to_bytes(cipher)
|
||||
cmd = [_get_gpg_exec(), '--homedir', _get_key_dir(), '--status-fd', '2',
|
||||
'--no-tty', '-d']
|
||||
|
Loading…
Reference in New Issue
Block a user