#3193: if anonymous session doesn't exist, promotion fails
-----------------------------------+----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: normal | Keywords:
-----------------------------------+----------------------------------------
If we can't get any session, promote_session
(source:trunk/trac/web/[EMAIL PROTECTED]) throws the following
exception:
{{{
2006-05-25 10:42:27,676 Trac[main] ERROR: iteration over non-sequence
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line
299, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line
176, in dispatch
req.session = Session(self.env, req)
File "/usr/local/lib/python2.4/site-packages/trac/web/session.py", line
51, in __init__
self.promote_session(sid)
File "/usr/local/lib/python2.4/site-packages/trac/web/session.py", line
118, in promote_session
authenticated_flags = [row[0] for row in cursor.fetchall()]
}}}
Changing:
{{{
authenticated_flags = [row[0] for row in cursor.fetchall()]
}}}
to:
{{{
try:
authenticated_flags = [row[0] for row in cursor.fetchall()]
except TypeError:
authenticated_flags = []
}}}
works for me.
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/3193>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets