Fix for bad string format in etcd srv_suffix resolution (#2037)

Fix for silly mistake introduced in #2029. This time tested on real ETCD and DNS.
This commit is contained in:
David Pavlíček
2021-08-19 08:32:45 +02:00
committed by GitHub
parent ed0e308b9b
commit c9f420fd4a
+1 -1
View File
@@ -290,7 +290,7 @@ class AbstractEtcdClientWithFailover(etcd.Client):
ret = []
for r in ['-client-ssl', '-client', '-ssl', '', '-server-ssl', '-server']:
r = r.format('{0}-{1}', r, srv_suffix) if srv_suffix else r
r = '{0}-{1}'.format(r, srv_suffix) if srv_suffix else r
protocol = 'https' if '-ssl' in r else 'http'
endpoint = '/members' if '-server' in r else ''
for host, port in self.get_srv_record('_etcd{0}._tcp.{1}'.format(r, srv)):