#3881: Don't mask server exception with session save exception
----------------------------------+------------------------------------
Reporter: hauserx@… | Owner: adrian
Type: Bug | Status: reopened
Component: contrib.sessions | Version: 1.3-beta
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by akaariai):
I just got hit by this issue. My initial though for fix was to add
connection.can_run_queries() method, so that one could do:
{{{
if connection.can_run_queries():
session.save()
}}}
The above would be done in sessions/backends/db.py (and maybe in
cached_db.py also).
Then I saw this ticket and now I am wondering if the approach taken in
this ticket is better. The main question is if we want to save the session
at all when an exception occurs?
I will go with the can_run_queries() approach if no other opinions are
given. The reason is that it should be somewhat simple to do and backwards
compatible.
--
Ticket URL: <https://code.djangoproject.com/ticket/3881#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.