summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/macfreeze/directives.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
commit182b5aca27d376b08a2904bed42b751496f932f3 (patch)
treedf13115820dbc879c0fe2eae488c9f8c0215a7da /Mac/Tools/macfreeze/directives.py
parente6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff)
downloadcpython-182b5aca27d376b08a2904bed42b751496f932f3.zip
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Mac/Tools/macfreeze/directives.py')
-rw-r--r--Mac/Tools/macfreeze/directives.py47
1 files changed, 23 insertions, 24 deletions
diff --git a/Mac/Tools/macfreeze/directives.py b/Mac/Tools/macfreeze/directives.py
index 3ef9661..7f6142e 100644
--- a/Mac/Tools/macfreeze/directives.py
+++ b/Mac/Tools/macfreeze/directives.py
@@ -17,27 +17,26 @@ DIRECTIVE_RE=r'^\s*#\s*macfreeze:\s*(\S*)\s*(.*)\s*$'
REPROG=re.compile(DIRECTIVE_RE)
def findfreezedirectives(program):
- extra_modules = []
- exclude_modules = []
- optional_modules = []
- extra_path = []
- progdir, filename = os.path.split(program)
- fp = open(program)
- for line in fp.readlines():
- match = REPROG.match(line)
- if match:
- directive = match.group(1)
- argument = match.group(2)
- if directive == 'include':
- extra_modules.append(argument)
- elif directive == 'exclude':
- exclude_modules.append(argument)
- elif directive == 'optional':
- optional_modules.append(argument)
- elif directive == 'path':
- argument = os.path.join(progdir, argument)
- extra_path.append(argument)
- else:
- print '** Unknown directive', line
- return extra_modules, exclude_modules, optional_modules, extra_path
-
+ extra_modules = []
+ exclude_modules = []
+ optional_modules = []
+ extra_path = []
+ progdir, filename = os.path.split(program)
+ fp = open(program)
+ for line in fp.readlines():
+ match = REPROG.match(line)
+ if match:
+ directive = match.group(1)
+ argument = match.group(2)
+ if directive == 'include':
+ extra_modules.append(argument)
+ elif directive == 'exclude':
+ exclude_modules.append(argument)
+ elif directive == 'optional':
+ optional_modules.append(argument)
+ elif directive == 'path':
+ argument = os.path.join(progdir, argument)
+ extra_path.append(argument)
+ else:
+ print '** Unknown directive', line
+ return extra_modules, exclude_modules, optional_modules, extra_path