From 2c6952fef43301fbc757f4939ca6f377ca982493 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Thu, 13 Sep 2012 11:32:05 +0300 Subject: [PATCH] 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 --- test/enable-tethering | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.34.1