* [gentoo-commits] proj/gentoo-ads:master commit in: gentoo_ads/ads/
@ 2011-05-04 20:15 Matthew Summers
0 siblings, 0 replies; only message in thread
From: Matthew Summers @ 2011-05-04 20:15 UTC (permalink / raw
To: gentoo-commits
commit: 7bf4468feba1e4c841e6dc052c2fb4a50d1d79b5
Author: Matthew Summers <matthew.summers <AT> liquidustech <DOT> com>
AuthorDate: Wed May 4 20:14:51 2011 +0000
Commit: Matthew Summers <quantumsummers <AT> gentoo <DOT> org>
CommitDate: Wed May 4 20:14:51 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-ads.git;a=commit;h=7bf4468f
Fix for inf loop b0rkage
---
gentoo_ads/ads/views.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gentoo_ads/ads/views.py b/gentoo_ads/ads/views.py
index 261dffe..11489f4 100644
--- a/gentoo_ads/ads/views.py
+++ b/gentoo_ads/ads/views.py
@@ -25,9 +25,8 @@ def _build_lang_array(request):
#accept_langs = [_.strip() for _ in accept_langs_raw.split(',')]
#accept_langs = accept_langs_raw.split(',')
# Handle dialects
- for _ in accept_langs:
- if '-' in _:
- accept_langs += [ re.sub('[-_][_-a-zA-Z0-9]+', '', _) ]
+ accept_langs = [re.sub('[-_][_-a-zA-Z0-9]+', '', lang) for lang in accept_langs if '-' in lang]
+
return accept_langs
def _match_langs(accept_langs, available_langs):
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-04 20:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 20:15 [gentoo-commits] proj/gentoo-ads:master commit in: gentoo_ads/ads/ Matthew Summers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox