Add check for log file existence

This commit is contained in:
Joshua M. Boniface 2024-08-16 09:47:24 -04:00
parent 6117e0d81d
commit cfe816a377

View file

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