[Zope-Checkins] CVS: Zope/lib/python/zdaemon - zdoptions.py:1.18

Fred L. Drake, Jr. fred@zope.com
Tue, 11 Feb 2003 22:57:03 -0500


Update of /cvs-repository/Zope/lib/python/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv9881

Modified Files:
	zdoptions.py 
Log Message:
- don't check that an attribute has been set if there's no attribute name
- add ZPL reference and copyright to the top


=== Zope/lib/python/zdaemon/zdoptions.py 1.17 => 1.18 ===
--- Zope/lib/python/zdaemon/zdoptions.py:1.17	Tue Feb 11 18:14:07 2003
+++ Zope/lib/python/zdaemon/zdoptions.py	Tue Feb 11 22:57:01 2003
@@ -1,3 +1,17 @@
+##############################################################################
+#
+# Copyright (c) 2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
 """Option processing for zdaemon and related code."""
 
 import os
@@ -220,7 +234,9 @@
         # Process environment variables
         for envvar in self.environ_map.keys():
             name, handler = self.environ_map[envvar]
-            if os.environ.has_key(envvar) and getattr(self, name) is None:
+            if name and getattr(self, name, None) is not None:
+                continue
+            if os.environ.has_key(envvar):
                 value = os.environ[envvar]
                 if handler is not None:
                     try: