From 65762a6e1736890973e5bc36aa13b761bdcd0cfb Mon Sep 17 00:00:00 2001 From: lumapu Date: Sat, 12 Nov 2022 01:56:29 +0100 Subject: [PATCH] fix python script --- src/web/html/convert.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/web/html/convert.py b/src/web/html/convert.py index 7c845149..4a8f1f32 100644 --- a/src/web/html/convert.py +++ b/src/web/html/convert.py @@ -52,14 +52,14 @@ def convert2Header(inFile): f.write("#endif /*__{}_{}_H__*/\n".format(define, define2)) f.close() -# delete all files in the 'h' dir, but ignore 'favicon_ico_gz.h' +# delete all files in the 'h' dir dir = 'h' if os.getcwd()[-4:] != "html": dir = "web/html/" + dir -for f in os.listdir(dir): - #if not f.startswith('favicon_ico_gz'): - os.remove(os.path.join(dir, f)) +if os.path.exists(dir): + for f in os.listdir(dir): + os.remove(os.path.join(dir, f)) # grab all files with following extensions if os.getcwd()[-4:] != "html":