[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 1/2] Don't populate flags.cmdline with "True" values when no = is used.



Since all tests are either flags.cmdline.has_key() or "if
flags.cmdline.get()", we want this to be None when there's no equals
sign, rather than True.
---
 flags.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/flags.py b/flags.py
index 8dbcc9f..d49b252 100644
--- a/flags.py
+++ b/flags.py
@@ -59,7 +59,7 @@ class Flags:
                 (key, val) = i.split("=", 1)
             except:
                 key = i
-                val = True
+                val = None
 
             cmdlineDict[key] = val
 
-- 
1.6.2.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]