Permalink
Browse files

All tests now pass on Python 3.2. Just changed __builtin__ to 'builti…

…ns'. It was the only error.
  • Loading branch information...
1 parent 4fd59e3 commit 868da06ba76c7dd08fb68890d9a6bb23bee68275 @jayd3e jayd3e committed Sep 27, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 pyramid_exclog/__init__.py
@@ -4,17 +4,21 @@
from pyramid.settings import aslist
from pyramid.util import DottedNameResolver
from pyramid.httpexceptions import WSGIHTTPException
+from pyramid.compat import PY3
resolver = DottedNameResolver(None)
-import __builtin__
+try:
+ import builtins
+except ImportError: # pragma: no cover
+ import __builtin__ as builtins
def as_globals_list(value):
L = []
value = aslist(value)
for dottedname in value:
- if dottedname in __builtin__.__dict__:
- dottedname = '__builtin__.%s' % dottedname
+ if dottedname in builtins.__dict__:
+ dottedname = 'builtins.%s' % dottedname
obj = resolver.resolve(dottedname)
L.append(obj)
return L

0 comments on commit 868da06

Please sign in to comment.