From 007137d6a923610e0d4d0ca686f128f841ceede8 Mon Sep 17 00:00:00 2001 From: age Date: Tue, 20 Nov 2007 11:58:58 +0000 Subject: [PATCH] fixes language sort problem, for just one language --- src/cryptobox/web/dataset.py | 3 ++- src/cryptobox/web/sites.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cryptobox/web/dataset.py b/src/cryptobox/web/dataset.py index 72a5219..75eb2a2 100644 --- a/src/cryptobox/web/dataset.py +++ b/src/cryptobox/web/dataset.py @@ -57,7 +57,8 @@ class WebInterfaceDataset(dict): for key in self.keys(): if key.startswith("Data.Languages."): del self[key] - langs = self.cbox.prefs["WebSettings"]["Languages"][:] + langs = [] + langs.append(self.cbox.prefs["WebSettings"]["Languages"][:]) langs.sort() for (index, lang) in enumerate(langs): try: diff --git a/src/cryptobox/web/sites.py b/src/cryptobox/web/sites.py index 7d3c6c1..cd96522 100644 --- a/src/cryptobox/web/sites.py +++ b/src/cryptobox/web/sites.py @@ -458,7 +458,8 @@ class WebInterfaceSites: 3. languages defined in the config file """ ## start with the configured language order - lang_order = self.cbox.prefs["WebSettings"]["Languages"][:] + lang_order = [] + lang_order.append(self.cbox.prefs["WebSettings"]["Languages"][:]) self.cbox.log.debug( "updating language preferences (default: %s)" % str(lang_order)) ## put the preferred browser language in front