File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ def __init__(
162
162
self .suffix = suffix
163
163
self .root_cn = root_cn
164
164
self .root_pw = root_pw
165
- self .hostname = "127.0.0.1"
165
+ self .host = host or "127.0.0.1"
166
166
167
167
self ._proc = None
168
168
self .port = port or self ._avail_tcpport ()
@@ -172,7 +172,7 @@ def __init__(
172
172
)
173
173
self ._slapd_conf = os .path .join (self .testrundir , "slapd.d" )
174
174
self ._db_directory = os .path .join (self .testrundir , "openldap-data" )
175
- self .ldap_uri = "ldap://%s:%d/" % (host or self .hostname , self .port )
175
+ self .ldap_uri = "ldap://%s:%d/" % (self .host , self .port )
176
176
self .debug = debug
177
177
have_ldapi = hasattr (socket , "AF_UNIX" )
178
178
if have_ldapi :
@@ -273,7 +273,7 @@ def _avail_tcpport(self):
273
273
"""
274
274
sock = socket .socket ()
275
275
try :
276
- sock .bind ((self .hostname , 0 ))
276
+ sock .bind ((self .host , 0 ))
277
277
port = sock .getsockname ()[1 ]
278
278
finally :
279
279
sock .close ()
You can’t perform that action at this time.
0 commit comments