Skip to content

Commit 1ed7c4b

Browse files
committed
fix: correct f-string syntax in OPA plugin error logging
The f-string at line 225 had incorrect syntax with the colon and variable inside the format specifier. Changed from: f"{OPAPluginErrorCodes.UNSUPPORTED_HOOK_TYPE.value: {hook}}" to: f"{OPAPluginErrorCodes.UNSUPPORTED_HOOK_TYPE.value}: {hook}" Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
1 parent d35004b commit 1ed7c4b

File tree

1 file changed

+1
-1
lines changed
  • plugins/external/opa/opapluginfilter

1 file changed

+1
-1
lines changed

plugins/external/opa/opapluginfilter/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def _preprocess_opa(self, policy_apply_config: AppliedTo = None, payload: HookPa
222222
hook_name = hook.resource_uri
223223
payload_name = payload.uri
224224
else:
225-
logger.error(f"{OPAPluginErrorCodes.UNSUPPORTED_HOOK_TYPE.value: {hook}}")
225+
logger.error(f"{OPAPluginErrorCodes.UNSUPPORTED_HOOK_TYPE.value}: {hook}")
226226
raise PluginError(PluginErrorModel(message=OPAPluginErrorCodes.UNSUPPORTED_HOOK_TYPE.value, plugin_name="OPAPluginFilter"))
227227

228228
if payload_name == hook_name or hook_name in payload_name:

0 commit comments

Comments
 (0)