Skip to content

Commit

Permalink
Merge pull request #621 from ldoktor/mux-fixes2
Browse files Browse the repository at this point in the history
Couple of multiplexer related improvements [v2]
  • Loading branch information
ruda committed May 27, 2015
2 parents 4ae0bf6 + b88497a commit 55a937c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions avocado/core/plugins/multiplexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def run(self, args):
cend = output.term_support.ENDC
paths = ', '.join(["%s%s@%s%s" % (_.name, color, _.yaml, cend)
for _ in tpl])
view.notify(event='minor', msg='\nVariant %s: %s' %
(index + 1, paths))
view.notify(event='minor', msg='%sVariant %s: %s' %
(('\n' if args.contents else ''), index + 1, paths))
if args.contents:
env = {}
for node in tpl:
Expand Down
6 changes: 4 additions & 2 deletions avocado/core/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,6 @@ def path_parent(path):
:return: the parent path as string.
"""
parent = path.rpartition('/')[0]
if parent == '':
return ''
return parent


Expand All @@ -533,8 +531,12 @@ def apply_filters(tree, filter_only=None, filter_out=None):
"""
if filter_only is None:
filter_only = []
else:
filter_only = [_.rstrip('/') for _ in filter_only if _]
if filter_out is None:
filter_out = []
else:
filter_out = [_.rstrip('/') for _ in filter_out if _]
for node in tree.iter_children_preorder():
keep_node = True
for path in filter_only:
Expand Down

0 comments on commit 55a937c

Please sign in to comment.