Mercurial > piecrust2
comparison piecrust/commands/builtin/info.py @ 340:794b047c9726
find: Don't change the pattern when there's none.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 06 Apr 2015 20:10:54 -0700 |
parents | b034f6f15e22 |
children | a65f04ddbea2 |
comparison
equal
deleted
inserted
replaced
339:0ab712eab0fb | 340:794b047c9726 |
---|---|
137 action='store_true') | 137 action='store_true') |
138 | 138 |
139 def run(self, ctx): | 139 def run(self, ctx): |
140 pattern = ctx.args.pattern | 140 pattern = ctx.args.pattern |
141 sources = list(ctx.app.sources) | 141 sources = list(ctx.app.sources) |
142 if not ctx.args.exact: | 142 if not ctx.args.exact and pattern is not None: |
143 pattern = '*%s*' % pattern | 143 pattern = '*%s*' % pattern |
144 | 144 |
145 for src in sources: | 145 for src in sources: |
146 if not ctx.args.include_theme and src.is_theme_source: | 146 if not ctx.args.include_theme and src.is_theme_source: |
147 continue | 147 continue |