Skip to content

Commit

Permalink
All tests now pass on Python 3.2. Just changed __builtin__ to 'builti…
Browse files Browse the repository at this point in the history
…ns'. It was the only error.
  • Loading branch information
jayd3e committed Sep 27, 2011
1 parent 4fd59e3 commit 868da06
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pyramid_exclog/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
from pyramid.settings import aslist from pyramid.settings import aslist
from pyramid.util import DottedNameResolver from pyramid.util import DottedNameResolver
from pyramid.httpexceptions import WSGIHTTPException from pyramid.httpexceptions import WSGIHTTPException
from pyramid.compat import PY3


resolver = DottedNameResolver(None) resolver = DottedNameResolver(None)


import __builtin__ try:
import builtins
except ImportError: # pragma: no cover
import __builtin__ as builtins


def as_globals_list(value): def as_globals_list(value):
L = [] L = []
value = aslist(value) value = aslist(value)
for dottedname in value: for dottedname in value:
if dottedname in __builtin__.__dict__: if dottedname in builtins.__dict__:
dottedname = '__builtin__.%s' % dottedname dottedname = 'builtins.%s' % dottedname
obj = resolver.resolve(dottedname) obj = resolver.resolve(dottedname)
L.append(obj) L.append(obj)
return L return L
Expand Down

0 comments on commit 868da06

Please sign in to comment.