File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import os
2- from subprocess import Popen , PIPE , STDOUT
2+ import platform
33import socket
4+ import subprocess
45import time
5- import platform
6+
67from client import Client
78
89
@@ -41,7 +42,10 @@ def start(self):
4142 This will start the browsermob proxy and then wait until it can
4243 interact with it
4344 """
44- self .process = Popen (self .command , stdout = PIPE , stderr = STDOUT )
45+ self .log_file = open (os .path .abspath ('server.log' ), 'w' )
46+ self .process = subprocess .Popen (self .command ,
47+ stdout = self .log_file ,
48+ stderr = subprocess .STDOUT )
4549 count = 0
4650 while not self ._is_listening ():
4751 time .sleep (0.5 )
@@ -64,6 +68,8 @@ def stop(self):
6468 # kill may not be available under windows environment
6569 pass
6670
71+ self .log_file .close ()
72+
6773 @property
6874 def url (self ):
6975 """
You can’t perform that action at this time.
0 commit comments