From dd09a5c764c75b2b4e2d63e83eb2f0cf227b87dc Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 9 Jul 2010 17:42:04 +0200 Subject: [PATCH] Parse boolean flag from test-connman argv Any non empty string evaluates to True which is clearly not intended. --- test/test-connman | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test-connman b/test/test-connman index aa781c3..174525a 100755 --- 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); -- 2.7.4