Remove functions in string module that are also string methods. Also remove:

* all calls to functions in the string module (except maketrans)
 * everything from stropmodule except for maketrans() which is still used
This commit is contained in:
Neal Norwitz 2007-04-17 08:48:32 +00:00
parent ff11334927
commit 9d72bb452b
69 changed files with 396 additions and 2113 deletions

View file

@ -8,7 +8,7 @@ and building lists of files.
__revision__ = "$Id$"
import os, string, re
import os, re
import fnmatch
from types import *
from glob import glob
@ -84,7 +84,7 @@ class FileList:
# -- "File template" methods ---------------------------------------
def _parse_template_line (self, line):
words = string.split(line)
words = line.split()
action = words[0]
patterns = dir = dir_pattern = None
@ -133,28 +133,28 @@ class FileList:
# right number of words on the line for that action -- so we
# can proceed with minimal error-checking.
if action == 'include':
self.debug_print("include " + string.join(patterns))
self.debug_print("include " + ' '.join(patterns))
for pattern in patterns:
if not self.include_pattern(pattern, anchor=1):
log.warn("warning: no files found matching '%s'",
pattern)
elif action == 'exclude':
self.debug_print("exclude " + string.join(patterns))
self.debug_print("exclude " + ' '.join(patterns))
for pattern in patterns:
if not self.exclude_pattern(pattern, anchor=1):
log.warn(("warning: no previously-included files "
"found matching '%s'"), pattern)
elif action == 'global-include':
self.debug_print("global-include " + string.join(patterns))
self.debug_print("global-include " + ' '.join(patterns))
for pattern in patterns:
if not self.include_pattern(pattern, anchor=0):
log.warn(("warning: no files found matching '%s' " +
"anywhere in distribution"), pattern)
elif action == 'global-exclude':
self.debug_print("global-exclude " + string.join(patterns))
self.debug_print("global-exclude " + ' '.join(patterns))
for pattern in patterns:
if not self.exclude_pattern(pattern, anchor=0):
log.warn(("warning: no previously-included files matching "
@ -163,7 +163,7 @@ class FileList:
elif action == 'recursive-include':
self.debug_print("recursive-include %s %s" %
(dir, string.join(patterns)))
(dir, ' '.join(patterns)))
for pattern in patterns:
if not self.include_pattern(pattern, prefix=dir):
log.warn(("warning: no files found matching '%s' " +
@ -172,7 +172,7 @@ class FileList:
elif action == 'recursive-exclude':
self.debug_print("recursive-exclude %s %s" %
(dir, string.join(patterns)))
(dir, ' '.join(patterns)))
for pattern in patterns:
if not self.exclude_pattern(pattern, prefix=dir):
log.warn(("warning: no previously-included files matching "