modpython: Show (module/__init__.py) in listavailmods

This commit is contained in:
Kyle Fuller
2011-09-05 17:27:35 +00:00
parent 9e95d1c3e1
commit 12d1a5a422
2 changed files with 12 additions and 21 deletions

View File

@@ -556,7 +556,8 @@ def get_mod_info_path(path, modname, modinfo):
except ImportError:
return 0
finally:
x[0].close()
if x[0]:
x[0].close()
if modname not in pymodule.__dict__:
return 0
cl = pymodule.__dict__[modname]