Pendrokar commited on
Commit
0e7dc9e
β€’
1 Parent(s): 69e97f2

xvaserver raise_for_status

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -24,7 +24,11 @@ def run_xvaserver():
24
  print("Web server failed to start.")
25
  sys.exit(0)
26
 
27
- requests.get('http://0.0.0.0:8008')
 
 
 
 
28
  print('xVAServer running on port 8008')
29
 
30
  # Read and print stdout and stderr of the subprocess
 
24
  print("Web server failed to start.")
25
  sys.exit(0)
26
 
27
+ # contact local xVASynth server; ~2 second timeout
28
+ logging.info(f'Attempting to connect to xVASynth...')
29
+ response = requests.get('http://0.0.0.0:8008')
30
+ response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
31
+
32
  print('xVAServer running on port 8008')
33
 
34
  # Read and print stdout and stderr of the subprocess