prevent too many newlines in output of --tc-statistics-from-ip

This commit is contained in:
Robert Chacón 2022-09-13 07:54:20 -06:00 committed by GitHub
parent f580baafac
commit ac79581c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ def printStatsFromIP(ipAddress):
commands = command.split(' ')
proc = subprocess.Popen(commands, stdout=subprocess.PIPE)
for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): # or another encoding
print(line)
print(line.replace('\n',''))
else:
print("Invalid IP address provided")