From 4ff80cec864ab5253c7403d5c3e5ec1a2b6d3d04 Mon Sep 17 00:00:00 2001 From: pictuga Date: Tue, 31 May 2016 02:46:28 +0200 Subject: [PATCH] Check argv length before using it --- morss/morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index 9d152dc..08a3953 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -700,7 +700,7 @@ def main(): elif len(sys.argv) <= 1 or isInt(sys.argv[1]) or '--root' in sys.argv[1:]: # start internal (basic) http server - if isInt(sys.argv[1]): + if len(sys.argv) > 1 and isInt(sys.argv[1]): argPort = int(sys.argv[1]) if argPort > 0: port = argPort