diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2010-04-27 13:40:52 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2010-04-27 13:40:52 +0000 |
| commit | 33f097e50b83bff669643f76ab4ab3c4316d77d8 (patch) | |
| tree | a65a36e13648bc56decb17e3490aae42cf8af84a | |
| parent | a43464d67eee4fde5e670d5c4086bdf6e0048e06 (diff) | |
Python 2.3 compatibility: replaced rsplit with something that works on 2.3.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/utils/module_loading.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/module_loading.py b/django/utils/module_loading.py index 9bcdd276fd..e8bc41ca31 100644 --- a/django/utils/module_loading.py +++ b/django/utils/module_loading.py @@ -6,7 +6,7 @@ def module_has_submodule(mod, submod_name): # its find_module must be used to search for submodules. loader = getattr(mod, '__loader__', None) if loader: - mod_path = "%s.%s" % (mod.__name__.rsplit('.',1)[-1], submod_name) + mod_path = "%s.%s" % (mod.__name__[mod.__name__.rfind('.')+1:], submod_name) x = loader.find_module(mod_path) if x is None: # zipimport.zipimporter.find_module is documented to take |
