Backport importlib to at least Python 2.5 by getting rid of use of str.format.

This commit is contained in:
Brett Cannon 2009-02-03 05:08:22 +00:00
parent 9db495b506
commit 1797b7dbbc
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ def _resolve_name(name, package, level):
raise ValueError("__package__ not set to a string")
base = package.rsplit('.', level)[0]
if name:
return "{0}.{1}".format(base, name)
return "%s.%s" % (base, name)
else:
return base