diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2010-03-12 03:27:33 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2010-03-12 03:27:33 +0100 |
commit | 15e69b337cb9e813f54cc7e172015ffbbca343f0 (patch) | |
tree | d84a19fd8d57d2020ca73f0c03f1b01dfc121abd /jinja2/loaders.py | |
parent | 64b08a0a84a0decd3778c93f3f5a82b75585e257 (diff) | |
download | jinja2-15e69b337cb9e813f54cc7e172015ffbbca343f0.tar.gz |
Streamlined code. Removed an unnecessary leftover.
--HG--
branch : trunk
Diffstat (limited to 'jinja2/loaders.py')
-rw-r--r-- | jinja2/loaders.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/jinja2/loaders.py b/jinja2/loaders.py index 5c82b79..bd435e8 100644 --- a/jinja2/loaders.py +++ b/jinja2/loaders.py @@ -385,13 +385,7 @@ class ChoiceLoader(BaseLoader): class _TemplateModule(ModuleType): - - def __init__(self, module): - if isinstance(module, basestring): - super(_TemplateModule, self).__init__(module) - else: - super(_TemplateModule, self).__init__(module.__name__) - self.__dict__.update(module.__dict__) + """Like a normal module but with support for weak references""" class ModuleLoader(BaseLoader): @@ -443,8 +437,7 @@ class ModuleLoader(BaseLoader): mod = getattr(self.module, module, None) if mod is None: try: - mod = _TemplateModule(__import__(module, None, - None, ['root'])) + mod = __import__(module, None, None, ['root']) except ImportError: raise TemplateNotFound(name) |