[Telepathy-commits] [telepathy-python/master] Don't use bool() for boolean parameter strings as it always returns True

Marco Barisione marco at barisione.org
Wed Nov 12 07:04:09 PST 2008


---
 examples/account.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/account.py b/examples/account.py
index 1af4504..bd5d74a 100644
--- a/examples/account.py
+++ b/examples/account.py
@@ -22,8 +22,10 @@ def parse_account(s):
             protocol = v
         else:
             if k not in ("account", "password"):
-                if v.lower() in ("false", "true"):
-                    v = bool(v)
+                if v.lower() == "false":
+                    v = False
+                elif v.lower() == "true":
+                    v = True
                 else:
                     try:
                         v = dbus.UInt32(int(v))
-- 
1.5.6.5



More information about the Telepathy-commits mailing list