From: Patrik Flykt Date: Thu, 13 Sep 2012 08:32:05 +0000 (+0300) Subject: test: Correctly check number of test script arguments X-Git-Tag: 1.7~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c6952fef43301fbc757f4939ca6f377ca982493;p=platform%2Fupstream%2Fconnman.git test: Correctly check number of test script arguments len(sys.argv) gives the number of arguments including the name of the command. Fixes BMC#25722 --- diff --git a/test/enable-tethering b/test/enable-tethering index c9668a10..cbcd4e72 100755 --- a/test/enable-tethering +++ b/test/enable-tethering @@ -3,7 +3,7 @@ import sys import dbus -if (len(sys.argv) >= 2 and len(sys.argv) < 4 and sys.argv[1] == "wifi"): +if (len(sys.argv) >= 3 and len(sys.argv) != 4 and sys.argv[1] == "wifi"): print "Usage: %s wifi [SSID] [passphrase]" % (sys.argv[0]) sys.exit(1) elif (len(sys.argv) < 2):