Hi,

I ran into bugs in lazr.config *we* should probably document (top of
schema.cfg would do, I think).  I will report the bugs, I guess to
Launchpad?  But it will take a while before they do a new release I
suppose.

Details, if you care:

lazr.config, ll. 336-373 contains

    _section_name_pattern = re.compile(r"\w[\w.-]+\w")

    def _parseSectionName(self, name):
        """Return a tuple of names and kinds embedded in the name.

[snip, same function]

        if self._section_name_pattern.match(section_name) is None:
            raise InvalidSectionNameError(
                r"[%s] name does not match [\w.-]+." % name
            )

Note that (1) _section_name_pattern requires that section names be at
least 3 characters (I tried to use "[os]" :-D), and (2) the error
message lies about the regular expression to match.  I suggest maybe

-    _section_name_pattern = re.compile(r"\w[\w.-]+\w")
+    _section_name_pattern = re.compile(r"\w[\w.-]*\w")

to allow two-character section names, and definitely

-                r"[%s] name does not match [\w.-]+." % name
+                r"[%s] name does not match %s."
+                % (name, _section_name_pattern.pattern)

to edit-proof the error message.

-- 
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source    https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
_______________________________________________
Mailman-Developers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to