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 11import os
22import subprocess
3+ import sys
34
45from git_deps .gitutils import GitUtils
56from git_deps .detector import DependencyDetector
@@ -122,5 +123,17 @@ def deps(revspec):
122123 "insecure!" )
123124 print ("!! Arbitrary code can be executed from browser!" )
124125 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