From 7290ec6883b7350b38be67cbc39163b366098976 Mon Sep 17 00:00:00 2001 From: Blallo Date: Tue, 29 Jan 2019 10:22:04 +0100 Subject: [PATCH] Cleaning the response fifo. Leave it behind if command fails. --- bot_z/cli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot_z/cli.py b/bot_z/cli.py index 864ae96..30033e7 100644 --- a/bot_z/cli.py +++ b/bot_z/cli.py @@ -182,6 +182,11 @@ def status_command(ctx: click.Context): logger.warning("File not found: %s", e) pass logger.info(resp) + try: + os.remove(rfifo_path) + except OSError as e: + logger.warning("Failed removing response fifo %s: %s", rfifo_path, e) + pass if __name__ == "__main__":