Commit e6a1acf7 by Michael DeHaan

Let "all" be an alias for "*" in patterns, fix output bug on non-command…

Let "all" be an alias for "*" in patterns, fix output bug on non-command execution, make clean now removes the build dir
parent c8b1bbc7
...@@ -24,6 +24,7 @@ pep8: ...@@ -24,6 +24,7 @@ pep8:
pep8 lib/ pep8 lib/
clean: clean:
rm -rf build
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete find . -type f -name "*.pyo" -delete
find . -type f -name "*~" -delete find . -type f -name "*~" -delete
......
...@@ -170,6 +170,7 @@ class Cli(object): ...@@ -170,6 +170,7 @@ class Cli(object):
else: else:
buf += "%s | FAILED >>" % hostname buf += "%s | FAILED >>" % hostname
buf += json.dumps(result, indent=4, sort_keys=True) buf += json.dumps(result, indent=4, sort_keys=True)
print buf
if options.tree: if options.tree:
path = os.path.join(options.tree, hostname) path = os.path.join(options.tree, hostname)
fd = open(path, "w+") fd = open(path, "w+")
......
...@@ -121,6 +121,8 @@ class Runner(object): ...@@ -121,6 +121,8 @@ class Runner(object):
subpatterns = pattern.split(";") subpatterns = pattern.split(";")
for subpattern in subpatterns: for subpattern in subpatterns:
# the pattern could be a real glob # the pattern could be a real glob
if subpattern == 'all':
return True
if fnmatch.fnmatch(host_name, subpattern): if fnmatch.fnmatch(host_name, subpattern):
return True return True
# or it could be a literal group name instead # or it could be a literal group name instead
......
File mode changed from 100644 to 100755
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