silently swallow IOError in timezone setting
authorraph
Fri, 08 Oct 2010 11:21:28 +0200
changeset 313 dcbb54cbfd06
parent 312 731664a49992
child 314 d22bd8a85f10
silently swallow IOError in timezone setting
src/cm/views/timezone.py
--- a/src/cm/views/timezone.py	Mon Oct 04 14:21:17 2010 +0200
+++ b/src/cm/views/timezone.py	Fri Oct 08 11:21:28 2010 +0200
@@ -14,8 +14,12 @@
 def timezone_set(request):
     if request.method == 'POST':
         #if request.user.is_authenticated():
-        tz = request.POST.get('tz', DEFAULT_TIME_ZONE)
-        request.session['tz'] = tz
+        try:
+            tz = request.POST.get('tz', DEFAULT_TIME_ZONE)
+            request.session['tz'] = tz
+        except IOError:
+            # silently swallow IOError
+            pass
     
     return HttpResponse('')
     
\ No newline at end of file