changeset 992:69cf0d90c525 default tip

fix
author Alain Mazy <am@orthanc.team>
date Thu, 22 Oct 2026 14:49:44 +0200
parents 0bfb71655123
children
files Plugins/Worklists/Run.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Worklists/Run.py	Thu Oct 22 12:55:16 2026 +0200
+++ b/Plugins/Worklists/Run.py	Thu Oct 22 14:49:44 2026 +0200
@@ -92,7 +92,7 @@
 
 def ClearDatabase():
     for f in os.listdir(WORKING):
-        if f != 'lockfile':
+        if f != 'lockfile' and f != '.keep':
             os.remove(os.path.join(WORKING, f))
 
 def AddToDatabase(worklist):
@@ -142,7 +142,7 @@
                 if not isQuery:
                     tag = as_ascii[4:13].lower()
                     if not tag in ignoreTags:
-                        line_without_comment = re.sub(rb'\s*#.*', b'', line)
+                        line_without_comment = re.sub(b'#.*', b'', line).strip()
                         line_without_comment = line_without_comment.replace(b'\0', b'')
                         current.append(line_without_comment[3:])