AttributeError triggered by i18n.py calling os.path.join with Language object.

Bug #827060 reported by Stephen A. Goss on 2011-08-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Medium
Barry Warsaw

Bug Description

Here is the error message in my logs:

Aug 15 18:16:49 2011 (26370) Uncaught runner exception: 'Language' object has no attribute 'startswith'
Aug 15 18:16:49 2011 (26370) Traceback (most recent call last):
  File "/home/sgoss/mailman_clone/src/mailman/core/runner.py", line 138, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/core/runner.py", line 220, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/runners/incoming.py", line 64, in _dispose
    process(mlist, msg, msgdata, mlist.start_chain)
  File "/home/sgoss/mailman_clone/src/mailman/core/chains.py", line 90, in process
    link.function(mlist, msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/chains/hold.py", line 190, in _process
    autorespond_to_sender(mlist, msg.sender, language)):
  File "/home/sgoss/mailman_clone/src/mailman/chains/hold.py", line 111, in autorespond_to_sender
    owneremail=mlist.owner_address,
  File "/home/sgoss/mailman_clone/src/mailman/utilities/i18n.py", line 200, in make
    path, fp = find(template_file, mailing_list, language, _trace)
  File "/home/sgoss/mailman_clone/src/mailman/utilities/i18n.py", line 157, in find
    for path in raw_search_order:
  File "/home/sgoss/mailman_clone/src/mailman/utilities/i18n.py", line 74, in _search
    yield os.path.join(path, language, template_file)
  File "/home/sgoss/phoenix-deploy/lib64/python2.6/posixpath.py", line 65, in join
    if b.startswith('/'):
AttributeError: 'Language' object has no attribute 'startswith'

Barry Warsaw (barry) wrote :

Yay for more untested code. See hold.py:100

    elif todays_count == max_autoresponses_per_day:

Changed in mailman:
status: New → Triaged
Barry Warsaw (barry) on 2011-08-24
Changed in mailman:
milestone: none → 3.0.0a8
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → Medium
status: Triaged → Fix Committed
Barry Warsaw (barry) on 2011-09-25
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers