Skip to content

Commit

Permalink
Add rationale comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cjwatson committed May 3, 2018
1 parent 10c1b82 commit 0546515
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/zope/configuration/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ def resolve(self, dottedname):
oname = ''

try:
# Without a fromlist, this returns the package rather than the
# module if the name contains a dot. Using a fromlist requires
# star imports to work, which may not be true if there are
# unicode items in __all__ due to unicode_literals on Python 2.
# Getting the module from sys.modules instead avoids both
# problems.
__import__(mname)
mod = sys.modules[mname]
except ImportError as v:
Expand Down

0 comments on commit 0546515

Please sign in to comment.