# HG changeset patch # User Paul Boddie # Date 1454104446 -3600 # Node ID beb6887d8035537b4b50a1d3bb688e8ce3293f5f # Parent 7f4bd7d4236a3b6378345d53b1751fd7addbb837 Handle empty locale settings. diff -r 7f4bd7d4236a -r beb6887d8035 imipweb/resource.py --- a/imipweb/resource.py Fri Jan 29 22:25:02 2016 +0100 +++ b/imipweb/resource.py Fri Jan 29 22:54:06 2016 +0100 @@ -3,7 +3,7 @@ """ Common resource functionality for Web calendar clients. -Copyright (C) 2014, 2015 Paul Boddie +Copyright (C) 2014, 2015, 2016 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -183,7 +183,7 @@ def get_user_locale(self): if not self.locale: - self.locale = self.get_preferences().get("LANG", "en", True) + self.locale = self.get_preferences().get("LANG", "en", True) or "en" return self.locale # Prettyprinting of dates and times.