Skip to content

Commit

Permalink
check builtins in cross-interpreter way
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Mar 29, 2015
1 parent b436a07 commit eb764cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/zExceptions/__init__.py
Expand Up @@ -17,6 +17,7 @@
"""

from types import ClassType
import __builtin__
import warnings

from zope.interface import implements
Expand Down Expand Up @@ -53,8 +54,8 @@ class Redirect(Exception):
def convertExceptionType(name):
import zExceptions
etype = None
if name in __builtins__:
etype = __builtins__[name]
if name in __builtin__.__dict__:
etype = getattr(__builtin__, name)
elif hasattr(zExceptions, name):
etype = getattr(zExceptions, name)
if (etype is not None and
Expand Down

0 comments on commit eb764cd

Please sign in to comment.