Skip to content

Commit 23eb4c4

Browse files
committed
Fix examples/adminapi.py ConfigSource printout
1 parent 160c1c0 commit 23eb4c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/adminapi.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Example Admin clients.
2020
#
2121

22-
from confluent_kafka.admin import AdminClient, NewTopic, NewPartitions, ConfigResource, ConfigEntry
22+
from confluent_kafka.admin import AdminClient, NewTopic, NewPartitions, ConfigResource, ConfigSource
2323
from confluent_kafka import KafkaException
2424
import sys
2525
import threading
@@ -89,11 +89,10 @@ def example_create_partitions(a, topics):
8989

9090
def print_config(config, depth):
9191
print('%40s = %-50s [%s,is:read-only=%r,default=%r,sensitive=%r,synonym=%r,synonyms=%s]' %
92-
((' ' * depth) + config.name, config.value,
93-
ConfigEntry.config_source_to_str(config.source),
92+
((' ' * depth) + config.name, config.value, ConfigSource(config.source),
9493
config.is_read_only, config.is_default,
9594
config.is_sensitive, config.is_synonym,
96-
["%s:%s" % (x.name, ConfigEntry.config_source_to_str(x.source))
95+
["%s:%s" % (x.name, ConfigSource(x.source))
9796
for x in iter(config.synonyms.values())]))
9897

9998

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy