Mercurial > ~astiob > upreckon > hgweb
diff upreckon/problem.py @ 209:c03a8113685d
Rewrote files.regexp as files.File.regexp (a class method)
I still dislike the iterative code though.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Thu, 18 Aug 2011 02:41:46 +0300 |
parents | 166a23999bf7 |
children | f94f9724c543 |
line wrap: on
line diff
--- a/upreckon/problem.py Thu Aug 18 02:20:24 2011 +0300 +++ b/upreckon/problem.py Thu Aug 18 02:41:46 2011 +0300 @@ -354,12 +354,12 @@ reobj = re.compile(pattern, re.UNICODE) if not group: ids = [] - for f in files.regexp(pattern): + for f in files.File.regexp(pattern): ids.append(re.match(reobj, f.virtual_path).group(1)) return natsorted(ids) else: ids = {} - for f in files.regexp(pattern): + for f in files.File.regexp(pattern): m = re.match(reobj, f.virtual_path) g = m.group(group) ids.setdefault(g, [])