From: vsr Date: Fri, 26 Oct 2012 15:10:43 +0000 (+0000) Subject: Add simple command line check for killSalomeWithPort.py script X-Git-Tag: V6_6_0b1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9cb4e26b35c2442c2816dd9e6da28edf80e378c5;p=modules%2Fkernel.git Add simple command line check for killSalomeWithPort.py script --- diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index 705c8e3ca..be71c654b 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -355,10 +355,19 @@ def killMyPortSpy(pid, port): return if __name__ == "__main__": + if len(sys.argv) < 2: + print "Usage: " + print " %s " % os.path.basename(sys.argv[0]) + print + print "Kills SALOME session running on specified ." + sys.exit(1) + pass if sys.argv[1] == "--spy": - pid = sys.argv[2] - port = sys.argv[3] - killMyPortSpy(pid, port) + if len(sys.argv) > 3: + pid = sys.argv[2] + port = sys.argv[3] + killMyPortSpy(pid, port) + pass sys.exit(0) pass for port in sys.argv[1:]: