From 8a4c36cdca2c512e9f0be8a862774c89367cf323 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 28 Nov 2011 16:27:36 -0500 Subject: fix on python 3 --- pyramid/util.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyramid/util.py b/pyramid/util.py index ee909c316..c439456b6 100644 --- a/pyramid/util.py +++ b/pyramid/util.py @@ -4,7 +4,11 @@ import sys import types import weakref -from pyramid.compat import string_types +from pyramid.compat import ( + integer_types, + string_types, + ) + from pyramid.exceptions import ConfigurationError from pyramid.path import package_of @@ -256,7 +260,9 @@ def object_description(object): """ if isinstance(object, string_types): return object - if isinstance(object, (bool, int, float, long, types.NoneType)): + if isinstance(object, integer_types): + return object + if isinstance(object, (bool, float, type(None))): return str(object) if isinstance(object, (tuple, set)): return shortrepr(object, ')') -- cgit v1.2.3