postinst's parsing of mailman3-web.py is brittle

Bug #1802036 reported by Paul Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mailman 3 Web Charm
Fix Released
Undecided
Unassigned
mailman-suite (Ubuntu)
New
Undecided
Unassigned

Bug Description

The postinst script parses mailman3-web.py with sed, and relies on the "ADMIN" value looking like this:

ADMINS = (
     ('Mailman Suite Admin', '<email address hidden>'),
)

i.e. a) "Mailman Suite Admin" must be present and b) the closing paren must be left-aligned.

The mailman3-web charm writes the file in the following perfectly valid Python:

ADMINS = (
    ('Mailman Web Admin', '<email address hidden>'),
    )

but which violates a) (wrong text) and b) (closing paren is indented).

We can fix this particular point in the charm but ideally the package would be able to cope with any valid Python syntax.

Revision history for this message
Paul Collins (pjdc) wrote :

We've landed a change in mailman3-web-charm that avoids these parsing problems.

Changed in mailman-suite (Ubuntu):
status: New → Fix Released
status: Fix Released → New
Changed in mailman3-web-charm:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.