Wrong error description if MM3 server is offline

Bug #790669 reported by benste on 2011-05-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DEFUNCT: Mailman 3 Web UI
Florian Fuchs

Bug Description

Start the Django project, use the latest a7 compatible REST client.

You get a timed out connection if the Mailmanserver (localhost:8001) is not running.
This issue isn't catched, but somehow handled by Django showing a Attribute Error

"'NoneType' object has no attribute 'makefile'"

I'd suggest displaying an appropriate error instead.

Related branches

benste (benste) wrote :

Django Traceback:

Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.2.3
Python Version: 2.6.6
Installed Applications:
Installed Middleware:

File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response
  100. response = callback(request, *callback_args, **callback_kwargs)
File "/home/benste/Projects/Gsoc_mailman/mailman_django/views.py" in list_index
  130. lists = c.get_lists()
File "/home/benste/Projects/Gsoc_mailman/mailman_django/mailmanclient/rest.py" in get_lists
  148. response = self._http_request('/3.0/lists')
File "/home/benste/Projects/Gsoc_mailman/mailman_django/mailmanclient/rest.py" in _http_request
  105. response, content = Http().request(url, method, data, headers)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py" in request
  1129. (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py" in _request
  901. (response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py" in _conn_request
  871. response = conn.getresponse()
File "/usr/lib/python2.6/httplib.py" in getresponse
  988. method=self._method)
File "/usr/lib/python2.6/httplib.py" in __init__
  330. self.fp = sock.makefile('rb', 0)

Exception Type: AttributeError at /
Exception Value: 'NoneType' object has no attribute 'makefile'

Changed in mailmanweb:
assignee: nobody → Florian Fuchs (flo-fuchs)
Florian Fuchs (flo-fuchs) wrote :

Fixed in Rev. 3

Changed in mailmanweb:
status: New → Fix Committed
Florian Fuchs (flo-fuchs) wrote :

If mailman is not running, an error message is returned that's not catched by the view so far. Maybe due to an API change? Or something completely different? Reopening ticket...

Changed in mailmanweb:
status: Fix Committed → Incomplete
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers