From cfe816a377dcf061223d075fb74c081387caf4cf Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 16 Aug 2024 09:47:24 -0400 Subject: [PATCH] Add check for log file existence --- rffmpeg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rffmpeg b/rffmpeg index b459860..d5c4a17 100755 --- a/rffmpeg +++ b/rffmpeg @@ -960,6 +960,10 @@ def run_control(config): View the rffmpeg log file. """ if follow_flag: + if not os.path.exists(config["logfile"]): + click.echo("Failed to find log file; have you initialized rffmpeg?") + exit(1) + with open(config["logfile"]) as file_: # Go to the end of file file_.seek(0, 2)