Commit a61674f1 authored by Jason R. Coombs's avatar Jason R. Coombs

Use a default that generates to the default behavior; no need to employ None as a sentry value.

--HG--
extra : source : 2c7c7486ddc40ee4272b23e1fafd51ab1611dc28
parent 15890a34
...@@ -22,7 +22,7 @@ def walk_revctrl(dirname=''): ...@@ -22,7 +22,7 @@ def walk_revctrl(dirname=''):
#TODO will need test case #TODO will need test case
class re_finder(object): class re_finder(object):
def __init__(self, path, pattern, postproc=None): def __init__(self, path, pattern, postproc=lambda x: x):
self.pattern = pattern self.pattern = pattern
self.postproc = postproc self.postproc = postproc
self.path = convert_path(path) self.path = convert_path(path)
...@@ -35,9 +35,8 @@ class re_finder(object): ...@@ -35,9 +35,8 @@ class re_finder(object):
f.close() f.close()
for match in self.pattern.finditer(data): for match in self.pattern.finditer(data):
path = match.group(1) path = match.group(1)
if self.postproc: # postproc was formerly used when the svn finder
#postproc used to be used when the svn finder # was an re_finder for calling unescape
#was an re_finder for calling unescape
path = self.postproc(path) path = self.postproc(path)
yield svn_utils.joinpath(dirname,path) yield svn_utils.joinpath(dirname,path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment