mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
fixed problem with "reloading" sub-sub-modules -- jvr
This commit is contained in:
parent
14162abf6e
commit
2aaeb52665
1 changed files with 4 additions and 3 deletions
|
@ -520,13 +520,14 @@ class Editor(W.Window):
|
|||
modname = ""
|
||||
while os.path.exists(os.path.join(dir, "__init__.py")):
|
||||
dir, dirname = os.path.split(dir)
|
||||
modname = modname + dirname + '.'
|
||||
modname = dirname + '.' + modname
|
||||
subname = _filename_as_modname(self.title)
|
||||
if modname:
|
||||
if subname == "__init__":
|
||||
modname = modname[:-1] # strip trailing period
|
||||
# strip trailing period
|
||||
modname = modname[:-1]
|
||||
else:
|
||||
modname = modname + subname
|
||||
modname = modname + subname
|
||||
else:
|
||||
modname = subname
|
||||
if sys.modules.has_key(modname):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue