From 1cb46a8f8fcb0a7970ba93cc73cbaa23fd724c24 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Wed, 30 Nov 2022 13:43:39 -0500 Subject: [PATCH] metadata: fix check for existing objects Don't process files with EXCLUDE_OBJECT_DEFINE gcode commands. Signed-off-by: Eric Callahan --- moonraker/components/file_manager/metadata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moonraker/components/file_manager/metadata.py b/moonraker/components/file_manager/metadata.py index 546bd33..048f4ba 100644 --- a/moonraker/components/file_manager/metadata.py +++ b/moonraker/components/file_manager/metadata.py @@ -137,7 +137,10 @@ class BaseSlicer(object): data: str, pattern: Optional[str] = None ) -> bool: - match = re.search(r"\nDEFINE_OBJECT NAME=", data) + match = re.search( + r"\n(DEFINE_OBJECT)|(EXCLUDE_OBJECT_DEFINE) NAME=", + data + ) if match is not None: # Objects alread processed return False