mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix review nits
This commit is contained in:
parent
6abc2daf56
commit
19911987b7
1 changed files with 2 additions and 2 deletions
|
@ -1575,8 +1575,8 @@ def dedent(text, linesep=os.linesep):
|
|||
linesep = salt.utils.to_unicode(linesep)
|
||||
unicode_text = textwrap.dedent(salt.utils.to_unicode(text))
|
||||
clean_text = linesep.join(unicode_text.splitlines())
|
||||
if unicode_text.endswith(salt.utils.to_unicode('\n')):
|
||||
clean_text = clean_text + linesep
|
||||
if unicode_text.endswith(u'\n'):
|
||||
clean_text += linesep
|
||||
if not isinstance(text, six.text_type):
|
||||
return salt.utils.to_bytes(clean_text)
|
||||
return clean_text
|
||||
|
|
Loading…
Add table
Reference in a new issue