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
This commit is contained in:
parent
a43464d67e
commit
33f097e50b
|
@ -6,7 +6,7 @@ def module_has_submodule(mod, submod_name):
|
||||||
# its find_module must be used to search for submodules.
|
# its find_module must be used to search for submodules.
|
||||||
loader = getattr(mod, '__loader__', None)
|
loader = getattr(mod, '__loader__', None)
|
||||||
if loader:
|
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)
|
x = loader.find_module(mod_path)
|
||||||
if x is None:
|
if x is None:
|
||||||
# zipimport.zipimporter.find_module is documented to take
|
# zipimport.zipimporter.find_module is documented to take
|
||||||
|
|
Loading…
Reference in New Issue