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
0e18b157e3
commit
6c92ed2021
1 changed files with 2 additions and 2 deletions
|
@ -1614,8 +1614,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