From b13c2cf6e3f4adc75b9d0dfd367eefeb4ce26c2c Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 28 Aug 2013 09:57:21 -0500 Subject: [PATCH] possibly solved issue 1617? thanks fredcy --- VERSION | 2 +- gluon/custom_import.py | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/VERSION b/VERSION index cf91d254..de05d58c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.08.27.22.25.14 +Version 2.6.0-development+timestamp.2013.08.28.09.56.28 diff --git a/gluon/custom_import.py b/gluon/custom_import.py index 5e06d7dd..091aac76 100644 --- a/gluon/custom_import.py +++ b/gluon/custom_import.py @@ -119,8 +119,6 @@ class TrackImporter(object): globals = globals or {} locals = locals or {} fromlist = fromlist or [] - if not hasattr(self.THREAD_LOCAL, '_modules_loaded'): - self.THREAD_LOCAL._modules_loaded = set() try: # Check the date and reload if needed: self._update_dates(name, globals, locals, fromlist, level) @@ -175,16 +173,14 @@ class TrackImporter(object): if reload_mod or not date or new_date > date: self._import_dates[file] = new_date if reload_mod or (date and new_date > date): - if module not in self.THREAD_LOCAL._modules_loaded: - if mod_to_pack: - # Module turning into a package: - mod_name = module.__name__ - del sys.modules[mod_name] # Delete the module - # Reload the module: - NATIVE_IMPORTER(mod_name, globals, locals, [], level) - else: - reload(module) - self.THREAD_LOCAL._modules_loaded.add(module) + if mod_to_pack: + # Module turning into a package: + mod_name = module.__name__ + del sys.modules[mod_name] # Delete the module + # Reload the module: + NATIVE_IMPORTER(mod_name, globals, locals, [], level) + else: + reload(module) def _get_module_file(self, module): """