[Zconfig] SVN: ZConfig/trunk/cmdline.py add a _normalize_case()
method similar to ZConfig.cfgparser.Parser()
Fred L. Drake, Jr.
fdrake at gmail.com
Tue Aug 30 17:30:51 EDT 2005
Log message for revision 38176:
add a _normalize_case() method similar to ZConfig.cfgparser.Parser()
Changed:
U ZConfig/trunk/cmdline.py
-=-
Modified: ZConfig/trunk/cmdline.py
===================================================================
--- ZConfig/trunk/cmdline.py 2005-08-30 21:27:04 UTC (rev 38175)
+++ ZConfig/trunk/cmdline.py 2005-08-30 21:30:51 UTC (rev 38176)
@@ -121,7 +121,7 @@
optpath, val, pos = item
s = optpath[0]
bk = self.basic_key(s, pos)
- if name and s.lower() == name:
+ if name and self._normalize_case(s) == name:
L.append((optpath[1:], val, pos))
elif bk == type:
L.append((optpath[1:], val, pos))
@@ -138,7 +138,10 @@
raise ZConfig.ConfigurationError(
"not all command line options were consumed")
+ def _normalize_case(self, string):
+ return string.lower()
+
class MatcherMixin:
def set_optionbag(self, bag):
self.optionbag = bag
More information about the ZConfig
mailing list