From f4b10471fa19dd6f40b4d8ec19401469c61c84e4 Mon Sep 17 00:00:00 2001 From: Olivier Jolly Date: Tue, 2 Feb 2016 14:46:48 +0100 Subject: [PATCH] Remove only first matching tag Current implementation would fail when iterating on the next element, looking for tags to remove as we changed the underlying collection. Stopping on first occurence is a fine workaround. --- rnsutils/instrument.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rnsutils/instrument.py b/rnsutils/instrument.py index 050facd..d9df782 100644 --- a/rnsutils/instrument.py +++ b/rnsutils/instrument.py @@ -223,6 +223,7 @@ class RenoiseInstrument(object): tag = self.root.GlobalProperties.Tags.Tag[tag_idx] if tag.text == tag_to_remove: del self.root.GlobalProperties.Tags.Tag[tag_idx] + return def cleanup(self): # ensure that key mapping remains in the limits of what renoise supports