Added a 'set_up' and 'tear_down' which are like tasks, but execute before and after roles.

This commit is contained in:
Michael DeHaan 2013-04-20 16:07:06 -04:00
parent e6bf01a6b0
commit d7623d1f91
3 changed files with 37 additions and 1 deletions

View file

@ -61,6 +61,16 @@ class PluginLoader(object):
self._extra_dirs = []
def print_paths(self):
''' Returns a string suitable for printing of the search path '''
# Uses a list to get the order right
ret = []
for i in self._get_paths():
if i not in ret:
ret.append(i)
return os.pathsep.join(ret)
def _get_package_path(self):
''' Gets the path of a Python package '''