projects
/
profile
/
ivi
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe1e4c2
)
Parse boolean flag from test-connman argv
author
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Fri, 9 Jul 2010 15:42:04 +0000
(17:42 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 9 Jul 2010 15:42:04 +0000
(17:42 +0200)
Any non empty string evaluates to True which is clearly not intended.
test/test-connman
patch
|
blob
|
history
diff --git
a/test/test-connman
b/test/test-connman
index
aa781c3
..
174525a
100755
(executable)
--- a/
test/test-connman
+++ b/
test/test-connman
@@
-298,7
+298,8
@@
elif sys.argv[1] in ["autoconnect", "autoconn"]:
"org.moblin.connman.Service")
if (len(sys.argv) > 3):
- autoconnect = dbus.Boolean(sys.argv[3])
+ flag = sys.argv[3].strip().lower()
+ autoconnect = dbus.Boolean(flag not in ['false', 'f', 'n', '0'])
service.SetProperty("AutoConnect", autoconnect);