projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b244baa
)
test: Correctly check number of test script arguments
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Thu, 13 Sep 2012 08:32:05 +0000
(11:32 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Thu, 13 Sep 2012 10:44:17 +0000
(13:44 +0300)
len(sys.argv) gives the number of arguments including the
name of the command.
Fixes BMC#25722
test/enable-tethering
patch
|
blob
|
history
diff --git
a/test/enable-tethering
b/test/enable-tethering
index
c9668a1
..
cbcd4e7
100755
(executable)
--- 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):