File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 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):
2222 sock = socket .create_connection (("localhost" , port ))
2323 except socket .error :
2424 return True
25+ sock .close ()
26+
2527 if rais :
2628 raise RuntimeError ("The server is already running on port {0}" .format (port ))
2729 return False
@@ -136,7 +138,7 @@ def __init__(self,
136138 ssl_ca_file = None ,
137139 ssl_ciphers = None ,
138140 create_unix_socket = False ):
139- os .popen ('ulimit -c unlimited' )
141+ os .popen ('ulimit -c unlimited' ). close ()
140142
141143 if create_unix_socket :
142144 self .host = None
@@ -210,6 +212,7 @@ def wait_until_started(self):
210212 while True :
211213 ans = temp ('box.info.status' )[0 ]
212214 if ans in ('running' , 'hot_standby' , 'orphan' ) or ans .startswith ('replica' ):
215+ temp .disconnect ()
213216 return True
214217 elif ans in ('loading' ,):
215218 continue
@@ -262,6 +265,8 @@ def clean(self):
262265 if (self ._socket is not None ) and (not self ._socket .file .closed ):
263266 self ._socket .close ()
264267
268+ del self .log_des
269+
265270 def __del__ (self ):
266271 self .stop ()
267272 self .clean ()
You can’t perform that action at this time.
0 commit comments