From 4a26b38c4d4f21e9dab3ec864af1a76eebe86801 Mon Sep 17 00:00:00 2001 From: Samuel Henrique Oliveira da Silva Date: Sun, 19 Nov 2017 12:41:09 -0200 Subject: [PATCH] Fixes -c to actually clear instead of only stopping the slideshow --- pokemonterminal/main.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pokemonterminal/main.py b/pokemonterminal/main.py index ee41b85..ecce7ae 100644 --- a/pokemonterminal/main.py +++ b/pokemonterminal/main.py @@ -112,12 +112,10 @@ def main(argv): return if options.clear: - if not PIPE_EXISTS: - print("Slideshow not running") - sys.exit(0) - pipe_out = os.open(PIPE_PATH, os.O_WRONLY) - os.write(pipe_out, b"quit\n") - os.close(pipe_out) + if PIPE_EXISTS: + pipe_out = os.open(PIPE_PATH, os.O_WRONLY) + os.write(pipe_out, b"quit\n") + os.close(pipe_out) scripter.clear_terminal() return