[dev-python/pylons] add patch that fixes execution with latest WebOb

This commit is contained in:
Fabio Erculiani
2013-03-18 19:51:55 +00:00
parent 3ae9db4889
commit 68cc8ee3f0
2 changed files with 21 additions and 2 deletions
@@ -0,0 +1,12 @@
diff -Nurp Pylons-1.0.1.orig/pylons/controllers/util.py Pylons-1.0.1/pylons/controllers/util.py
--- Pylons-1.0.1.orig/pylons/controllers/util.py 2011-12-13 22:40:32.000000000 +0000
+++ Pylons-1.0.1/pylons/controllers/util.py 2013-03-18 19:49:53.774373984 +0000
@@ -56,7 +56,7 @@ class Request(WebObRequest):
def languages(self):
# And we now have the old best_matches code that webob ditched!
al = self.accept_language
- items = [i for i, q in sorted(al._parsed, key=lambda iq: -iq[1])]
+ items = [i for i, q in sorted(getattr(al, '_parsed', []), key=lambda iq: -iq[1])]
for index, item in enumerate(items):
if al._match(item, self.language):
items[index:] = [self.language]
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/pylons/pylons-1.0.1.ebuild,v 1.1 2012/08/29 06:09:27 patrick Exp $
# $Header: $
EAPI="3"
PYTHON_DEPEND="2"
@@ -8,7 +8,7 @@ SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
DISTUTILS_SRC_TEST="nosetests"
inherit distutils
inherit eutils distutils
MY_PN="Pylons"
MY_P="${MY_PN}-${PV}"
@@ -50,3 +50,10 @@ DEPEND="${RDEPEND}
)"
S="${WORKDIR}/${MY_P}"
src_prepare() {
# Sabayon: we need this
epatch "${FILESDIR}/${P}-new-webob-support.patch"
distutils_src_prepare
}