refactored unnecessary for-loop

This commit is contained in:
2022-12-14 23:59:14 +03:00
parent 5da1a4fce3
commit 03243e9102

View File

@@ -21,9 +21,7 @@ def exec_command(command):
ssh_stdin.close() ssh_stdin.close()
# убираем лишние переносы строки из вывода # убираем лишние переносы строки из вывода
clean_lines = [] clean_lines = [line.strip() for line in ssh_stdout.readlines()]
for line in ssh_stdout.readlines():
clean_lines.append(line.strip())
return clean_lines return clean_lines