Fixes -c to actually clear instead of only stopping the slideshow

This commit is contained in:
Samuel Henrique Oliveira da Silva 2017-11-19 12:41:09 -02:00
parent c7ffb5fef5
commit 4a26b38c4d

View file

@ -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