summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-02-27 03:38:28 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-02-27 03:38:28 (GMT)
commitac10be365e5c25f2bedac75b3269a22f361d51e5 (patch)
tree59d835862ccff2cfb6e4192e15e3f015f8266239 /Lib/importlib
parent75a4fab6a4f248ea5129fdab847dec77c272fddd (diff)
downloadcpython-ac10be365e5c25f2bedac75b3269a22f361d51e5.zip
cpython-ac10be365e5c25f2bedac75b3269a22f361d51e5.tar.gz
cpython-ac10be365e5c25f2bedac75b3269a22f361d51e5.tar.bz2
Fix a bug where code was trying to index an int. Left over from the situation
from using str.rpartition to str.rindex. Closes Issue5213.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index e046bc0..35af00b 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -15,7 +15,7 @@ def _resolve_name(name, package, level):
try:
# rpartition is more "correct" and rfind is just as easy to use, but
# neither are in Python 2.3.
- dot_rindex = package.rindex('.', level)[0]
+ dot_rindex = package.rindex('.', level)
base = package[:dot_rindex]
except ValueError:
base = package