Add check for unknown modules

This commit is contained in:
Guido van Rossum 1994-10-03 16:37:36 +00:00
parent 00ff4336a9
commit 619e1beda9
1 changed files with 7 additions and 1 deletions

View File

@ -129,9 +129,15 @@ def main():
dict = findmodules.findmodules(scriptfile, modules, path) dict = findmodules.findmodules(scriptfile, modules, path)
builtins = [] builtins = []
for mod in dict.keys(): mods = dict.keys()
mods.sort()
for mod in mods:
if dict[mod] == '<builtin>': if dict[mod] == '<builtin>':
builtins.append(mod) builtins.append(mod)
elif dict[mod] == '<unknown>':
sys.stderr.write(
'Warning: module %s not found anywhere\n' %
mod)
outfp = open(frozen_c, 'w') outfp = open(frozen_c, 'w')
try: try: