From c97346811cf612b18e0a30a0f49dbadcf57b4047 Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Tue, 21 Nov 2023 17:36:04 +0000 Subject: [PATCH] Correct location of sync_only option --- openldap_opencensus_stats/config_transformers/child_object.py | 4 ++-- .../config_transformers/metric_name_interpolation.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openldap_opencensus_stats/config_transformers/child_object.py b/openldap_opencensus_stats/config_transformers/child_object.py index ef6b3dd..6f74f75 100644 --- a/openldap_opencensus_stats/config_transformers/child_object.py +++ b/openldap_opencensus_stats/config_transformers/child_object.py @@ -15,8 +15,8 @@ def process(configuration): config = copy.deepcopy(configuration) for server_config in config.get('ldap_servers'): - ldap_server = ChildObjectConfigurationTransformer.get_ldap_server(server_config) - if not ldap_server.get('sync_only', False): + if not server_config.get('sync_only', False): + ldap_server = ChildObjectConfigurationTransformer.get_ldap_server(server_config) server_config['object'] = ChildObjectConfigurationTransformer.process_objects_for_ldap_server( configuration=server_config.get('object', {}), dn='', diff --git a/openldap_opencensus_stats/config_transformers/metric_name_interpolation.py b/openldap_opencensus_stats/config_transformers/metric_name_interpolation.py index 0c41f66..d37b35c 100644 --- a/openldap_opencensus_stats/config_transformers/metric_name_interpolation.py +++ b/openldap_opencensus_stats/config_transformers/metric_name_interpolation.py @@ -15,8 +15,8 @@ def process(configuration): config = copy.deepcopy(configuration) for server_config in config.get('ldap_servers'): - ldap_server = ConfigurationTransformer.get_ldap_server(server_config=server_config) - if not ldap_server.get('sync_only', False): + if not server_config.get('sync_only', False): + ldap_server = ConfigurationTransformer.get_ldap_server(server_config=server_config) server_config['object'] = MetricNameInterpolationConfigurationTransformer.process_objects_for_ldap_server( configuration=server_config.get('object', {}), dn='',