From 7367fdcc3fed59af017a3c30a118a0bcaa0b1ccd Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Mon, 19 Jun 2023 23:40:02 +0800 Subject: [PATCH 1/2] clean up tmp file fix https://github.com/time4tea/gopro-dashboard-overlay/issues/135 --- bin/gopro-dashboard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/gopro-dashboard.py b/bin/gopro-dashboard.py index 40eac99a..ba17fe1e 100644 --- a/bin/gopro-dashboard.py +++ b/bin/gopro-dashboard.py @@ -316,6 +316,9 @@ def fmtdt(dt: datetime.datetime): log("...Stopping...") pass finally: + if redirect: + os.remove(redirect) + for t in [draw_timer]: log(t) From d889fef3c04feb6a6bb5790fab78a859efbe95c0 Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Mon, 19 Jun 2023 23:46:54 +0800 Subject: [PATCH 2/2] import os required for os.remove --- bin/gopro-dashboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/gopro-dashboard.py b/bin/gopro-dashboard.py index ba17fe1e..46ae673a 100644 --- a/bin/gopro-dashboard.py +++ b/bin/gopro-dashboard.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import datetime import sys +import os from importlib import metadata from pathlib import Path from typing import Optional