refactored unnecessary for-loop
This commit is contained in:
4
main.py
4
main.py
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user