summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
authorJust van Rossum <just@lettererror.com>1999-11-04 10:28:00 (GMT)
committerJust van Rossum <just@lettererror.com>1999-11-04 10:28:00 (GMT)
commit8ff52764efbeb7e88dd96de2ef3209b17ab5c5f6 (patch)
tree6c3c26c7326ce3b47dc6f07a056c847fdf7fa328 /Mac/Tools
parent5dbf526e8e79b35749f68fd8cfa4437e5146c5f7 (diff)
downloadcpython-8ff52764efbeb7e88dd96de2ef3209b17ab5c5f6.zip
cpython-8ff52764efbeb7e88dd96de2ef3209b17ab5c5f6.tar.gz
cpython-8ff52764efbeb7e88dd96de2ef3209b17ab5c5f6.tar.bz2
- changed the API of process() so it will return a list of missing modules instead of raising an exception.
- minor cleanups (jvr)
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/macfreeze/macmodulefinder.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Mac/Tools/macfreeze/macmodulefinder.py b/Mac/Tools/macfreeze/macmodulefinder.py
index 9897dcf..e89b990 100644
--- a/Mac/Tools/macfreeze/macmodulefinder.py
+++ b/Mac/Tools/macfreeze/macmodulefinder.py
@@ -48,8 +48,12 @@ class ModuleFinder(modulefinder.ModuleFinder):
self.modules[fqname] = m = Module(fqname)
return m
-def process(program, modules=[], module_files = [], debug=0):
- error = []
+def process(program, modules=None, module_files=None, debug=0):
+ if modules is None:
+ modules = []
+ if module_files is None:
+ module_files = []
+ missing = []
#
# Add the standard modules needed for startup
#
@@ -89,7 +93,7 @@ def process(program, modules=[], module_files = [], debug=0):
if not m in maymiss:
if debug > 0:
print 'Missing', m
- error.append(m)
+ missing.append(m)
#
# Warn the user about unused builtins
#
@@ -103,6 +107,4 @@ def process(program, modules=[], module_files = [], debug=0):
# XXXX Can this happen?
if debug > 0:
print 'Conflict', m
- if error:
- raise Missing, error
- return module_dict
+ return module_dict, missing