Permalink
Browse files

Remove use of fromlist kwargs on __import__

  • Loading branch information...
1 parent 96f8921 commit c5956807d000e746cc1bb7e7bad130a2054d5c88 @benhoyt committed Sep 25, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 symplate.py
View
@@ -339,11 +339,13 @@ def _get_module(self, name):
# try to import the compiled template; if it doesn't exist (it's never
# been compiled), compile it and then re-import
+ import_args = (names['module'], globals(), locals(),
+ [names['import']])
try:
- module = __import__(names['module'], fromlist=[names['import']])
+ module = __import__(*import_args)
except ImportError:
self.compile(name)
- module = __import__(names['module'], fromlist=[names['import']])
+ module = __import__(*import_args)
return module

0 comments on commit c595680

Please sign in to comment.