diff options
author | Matthew Summers <matthew.summers@liquidustech.com> | 2011-05-04 15:14:51 -0500 |
---|---|---|
committer | Matthew Summers <matthew.summers@liquidustech.com> | 2011-05-04 15:14:51 -0500 |
commit | 7bf4468feba1e4c841e6dc052c2fb4a50d1d79b5 (patch) | |
tree | be8f4abe6691a912d5125b50ceab11e15f310d02 | |
parent | Drop max-height for now. (diff) | |
download | gentoo-ads-7bf4468feba1e4c841e6dc052c2fb4a50d1d79b5.tar.gz gentoo-ads-7bf4468feba1e4c841e6dc052c2fb4a50d1d79b5.tar.bz2 gentoo-ads-7bf4468feba1e4c841e6dc052c2fb4a50d1d79b5.zip |
Fix for inf loop b0rkage
-rw-r--r-- | 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): |