[Zope-Checkins] CVS: ZODB3/zdaemon - zdctl.py:1.34

Guido van Rossum guido@python.org
Fri, 24 Jan 2003 13:06:05 -0500


Update of /cvs-repository/ZODB3/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv778

Modified Files:
	zdctl.py 
Log Message:
Fix a bug in _get_override(): for Boolean flags, the option was
returned even if the value was false.


=== ZODB3/zdaemon/zdctl.py 1.33 => 1.34 ===
--- ZODB3/zdaemon/zdctl.py:1.33	Fri Jan 24 13:01:41 2003
+++ ZODB3/zdaemon/zdctl.py	Fri Jan 24 13:06:02 2003
@@ -234,13 +234,16 @@
                     if v == value: # We didn't override anything
                         return []
                     break
-        args = [opt]
-        if not flag:
+        if flag:
+            if value:
+                args = [opt]
+            else:
+                args = []
+        else:
             if svalue is None:
                 svalue = str(value)
-            args.append(svalue)
+            args = [opt, svalue]
         return args
-                        
 
     def help_start(self):
         print "start -- Start the daemon process."