[svn r51329] rename special __package__ to __pkg__ because python 2.6 needs the former

(thanks to Ralf Schmitt)

--HG--
branch : trunk
This commit is contained in:
hpk
2008-02-08 09:43:05 +01:00
parent 37d357ff4c
commit f3f84fa36c
11 changed files with 32 additions and 30 deletions

View File

@@ -400,8 +400,8 @@ class LocalPath(common.FSPathBase, PlatformMixin):
self._prependsyspath(pkgpath.dirpath())
pkg = __import__(pkgpath.basename, None, None, [])
if hasattr(pkg, '__package__'):
modname = pkg.__package__.getimportname(self)
if hasattr(pkg, '__pkg__'):
modname = pkg.__pkg__.getimportname(self)
assert modname is not None, "package %s doesn't know %s" % (
pkg.__name__, self)