From 859e947aae832194e1a22905898be9ebe05b20ed Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 6 Aug 2012 00:11:12 -0400 Subject: fix under py3 --- pyramid/config/__init__.py | 6 ++++-- pyramid/tests/test_config/test_predicates.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyramid/config/__init__.py b/pyramid/config/__init__.py index 2fca7a162..7e6649c14 100644 --- a/pyramid/config/__init__.py +++ b/pyramid/config/__init__.py @@ -1084,7 +1084,8 @@ def resolveConflicts(actions): other conflicting actions. """ - def orderandpos((n, v)): + def orderandpos(v): + n, v = v if not isinstance(v, dict): # old-style tuple action v = expand_action(*v) @@ -1092,7 +1093,8 @@ def resolveConflicts(actions): sactions = sorted(enumerate(actions), key=orderandpos) - def orderonly((n,v)): + def orderonly(v): + n, v = v if not isinstance(v, dict): # old-style tuple action v = expand_action(*v) diff --git a/pyramid/tests/test_config/test_predicates.py b/pyramid/tests/test_config/test_predicates.py index 79dabd5d4..94e613715 100644 --- a/pyramid/tests/test_config/test_predicates.py +++ b/pyramid/tests/test_config/test_predicates.py @@ -203,7 +203,7 @@ class TestCustomPredicate(unittest.TestCase): def test_text_func_repr(self): pred = predicate() inst = self._makeOne(pred) - self.assertEqual(inst.text(), u'custom predicate: object predicate') + self.assertEqual(inst.text(), 'custom predicate: object predicate') def test_phash(self): pred = predicate() -- cgit v1.2.3