Fix label sanitization error handling. (#1029)

This commit is contained in:
Felix Fontein
2025-01-22 21:45:08 +01:00
committed by GitHub
parent 9e26c4794e
commit 9cc70f5202
3 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ class DifferenceTracker(object):
def sanitize_labels(labels, labels_field, client=None, module=None):
def fail(msg):
if client is not None:
client.module.fail(msg)
client.fail(msg)
if module is not None:
module.fail_json(msg=msg)
raise ValueError(msg)