diff options
| author | Chris McDonough <chrism@plope.com> | 2011-11-28 16:27:36 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-11-28 16:27:36 -0500 |
| commit | 8a4c36cdca2c512e9f0be8a862774c89367cf323 (patch) | |
| tree | fedd37d0ae8da0b1058fd0c29a62d230f9e901e3 | |
| parent | dafb0b3271f525fb8552d155a4dd840ced1656c8 (diff) | |
| download | pyramid-8a4c36cdca2c512e9f0be8a862774c89367cf323.tar.gz pyramid-8a4c36cdca2c512e9f0be8a862774c89367cf323.tar.bz2 pyramid-8a4c36cdca2c512e9f0be8a862774c89367cf323.zip | |
fix on python 3
| -rw-r--r-- | pyramid/util.py | 10 |
1 files 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, ')') |
