File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import subprocess
3
+ import sys
3
4
4
5
from git_deps .gitutils import GitUtils
5
6
from git_deps .detector import DependencyDetector
@@ -122,5 +123,17 @@ def deps(revspec):
122
123
"insecure!" )
123
124
print ("!! Arbitrary code can be executed from browser!" )
124
125
print ()
125
- webserver .run (port = options .port , debug = options .debug ,
126
- host = options .bindaddr )
126
+ try :
127
+ webserver .run (port = options .port , debug = options .debug ,
128
+ host = options .bindaddr )
129
+ except OSError as e :
130
+ print ("\n !!! ERROR: Could not start server:" )
131
+ print ("!!!" )
132
+ print ("!!! " + str (e ))
133
+ print ("!!!" )
134
+ if e .strerror == "Address already in use" :
135
+ print ("!!! Do you already have a git deps server running?" )
136
+ print ("!!! If so, stop it first and try again." )
137
+ print ("!!!" )
138
+ print ("!!! Aborting." )
139
+ sys .exit (1 )
You can’t perform that action at this time.
0 commit comments