Merge pull request #3316 from dsedivec/devel

expanduser on each component of plug-in paths
This commit is contained in:
Michael DeHaan 2013-06-30 09:12:15 -07:00
commit 98e7eaf07a
3 changed files with 56 additions and 7 deletions

View file

@ -16,6 +16,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import os
import os.path
import sys
import glob
import imp
@ -108,6 +109,7 @@ class PluginLoader(object):
# look in any configured plugin paths, allow one level deep for subcategories
configured_paths = self.config.split(os.pathsep)
for path in configured_paths:
path = os.path.expanduser(path)
contents = glob.glob("%s/*" % path)
for c in contents:
if os.path.isdir(c):