remove fortune white space

This commit is contained in:
Craig Lamparter 2021-01-17 08:02:45 -08:00
parent 83f42dd7b7
commit ca05676c98
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ class FortunePlugin(plugin.APRSDPluginBase):
timeout=3,
universal_newlines=True,
)
output = (
output.replace("\r", "")
.replace("\n", "")
.replace(" ", "")
.replace("\t", " ")
)
except subprocess.CalledProcessError as ex:
reply = "Fortune command failed '{}'".format(ex.output)
else: