summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-13 11:32:05 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-13 13:44:17 +0300
commit2c6952fef43301fbc757f4939ca6f377ca982493 (patch)
tree1bee47f97c246e86db575ba219a8bf6a1bc61171
parentb244baab93da9c18e2413c7f0c3fef46c778f39c (diff)
downloadconnman-2c6952fef43301fbc757f4939ca6f377ca982493.tar.gz
connman-2c6952fef43301fbc757f4939ca6f377ca982493.tar.bz2
connman-2c6952fef43301fbc757f4939ca6f377ca982493.zip
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
-rwxr-xr-xtest/enable-tethering2
1 files changed, 1 insertions, 1 deletions
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):