From 262a3132310a4fb4a0c53092da9a26a2366b869c Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Fri, 29 Dec 2023 14:23:05 +0000 Subject: [PATCH] fix: conditional was never true due to map --- utils/kayobe-automation-redact | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/utils/kayobe-automation-redact b/utils/kayobe-automation-redact index 2bae110..a20deb7 100755 --- a/utils/kayobe-automation-redact +++ b/utils/kayobe-automation-redact @@ -10,13 +10,13 @@ annotation_exceptions = { } def annotate(ctx, value): - if not isinstance(value, str): - return value - path_str = map(str, ctx['path']) - if path_str in annotation_exceptions: - return f"{'.'.join(annotation_exceptions['prometheus_bcrypt_salt'])}.{value}" - else: - return f"{'.'.join(path_str)}.{ value }" + if not isinstance(value, str): + return value + path_str = ctx['path'][0] + if path_str in annotation_exceptions: + return f"{annotation_exceptions[path_str]}.{value}" + else: + return f"{path_str}.{value}" def redact_int(ctx, x): # For numbers we can't indicate change with a string, so use sentinal values