[Mpuls-commits] r1550 - wasko/branches/2.0/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 15 14:41:59 CET 2010
Author: torsten
Date: 2010-02-15 14:41:58 +0100 (Mon, 15 Feb 2010)
New Revision: 1550
Modified:
wasko/branches/2.0/mpulsweb/lib/base.py
Log:
* mpulsweb/lib/base.py (BaseController.__before__): Improved setting
of language based on browsersettings.
Modified: wasko/branches/2.0/mpulsweb/lib/base.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/base.py 2010-02-15 13:34:15 UTC (rev 1549)
+++ wasko/branches/2.0/mpulsweb/lib/base.py 2010-02-15 13:41:58 UTC (rev 1550)
@@ -97,13 +97,18 @@
try:
log.debug('Trying to set lang to %s' % lang)
set_lang(lang)
- log.debug('Ok. Lang set to %s' % lang)
break;
except Exception, e:
+ log.debug('Can not set lang to %s' % lang)
+ else:
+ log.debug('Trying to set lang to default: %s' % deflang)
+ try:
+ lang = deflang
+ set_lang(lang)
+ except:
log.exception(e)
- log.debug('Trying to set lang to default: %s' % deflang)
- set_lang(deflang)
- log.debug('Ok. Lang set to %s' % deflang)
+ raise
+ log.debug('Ok. Lang set to %s' % lang)
# Check if the user is already authorized.
# If not then redirect the user to the login page
More information about the Mpuls-commits
mailing list