diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-02-05 18:33:57 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-02-05 18:33:57 -0500 |
commit | a61674f1324778f8b231c569325eab60e0e78482 (patch) | |
tree | 76d7bcce71d192001097f1610f2bf3775be4fabc | |
parent | 15890a34456e31755d991bcbb2970591e32c8131 (diff) | |
download | external_python_setuptools-a61674f1324778f8b231c569325eab60e0e78482.tar.gz external_python_setuptools-a61674f1324778f8b231c569325eab60e0e78482.tar.bz2 external_python_setuptools-a61674f1324778f8b231c569325eab60e0e78482.zip |
Use a default that generates to the default behavior; no need to employ None as a sentry value.
--HG--
extra : source : 2c7c7486ddc40ee4272b23e1fafd51ab1611dc28
-rwxr-xr-x | setuptools/command/sdist.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index aa6f47f0..b59cc390 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -22,7 +22,7 @@ def walk_revctrl(dirname=''): #TODO will need test case class re_finder(object): - def __init__(self, path, pattern, postproc=None): + def __init__(self, path, pattern, postproc=lambda x: x): self.pattern = pattern self.postproc = postproc self.path = convert_path(path) @@ -35,10 +35,9 @@ class re_finder(object): f.close() for match in self.pattern.finditer(data): path = match.group(1) - if self.postproc: - #postproc used to be used when the svn finder - #was an re_finder for calling unescape - path = self.postproc(path) + # postproc was formerly used when the svn finder + # was an re_finder for calling unescape + path = self.postproc(path) yield svn_utils.joinpath(dirname,path) def __call__(self, dirname=''): |