File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ def check_port(port, rais=True):
22
22
sock = socket .create_connection (("localhost" , port ))
23
23
except socket .error :
24
24
return True
25
+ sock .close ()
26
+
25
27
if rais :
26
28
raise RuntimeError ("The server is already running on port {0}" .format (port ))
27
29
return False
@@ -136,7 +138,7 @@ def __init__(self,
136
138
ssl_ca_file = None ,
137
139
ssl_ciphers = None ,
138
140
create_unix_socket = False ):
139
- os .popen ('ulimit -c unlimited' )
141
+ os .popen ('ulimit -c unlimited' ). close ()
140
142
141
143
if create_unix_socket :
142
144
self .host = None
@@ -210,6 +212,7 @@ def wait_until_started(self):
210
212
while True :
211
213
ans = temp ('box.info.status' )[0 ]
212
214
if ans in ('running' , 'hot_standby' , 'orphan' ) or ans .startswith ('replica' ):
215
+ temp .disconnect ()
213
216
return True
214
217
elif ans in ('loading' ,):
215
218
continue
@@ -262,6 +265,8 @@ def clean(self):
262
265
if (self ._socket is not None ) and (not self ._socket .file .closed ):
263
266
self ._socket .close ()
264
267
268
+ del self .log_des
269
+
265
270
def __del__ (self ):
266
271
self .stop ()
267
272
self .clean ()
You can’t perform that action at this time.
0 commit comments