Updating unittests for v2 stuff

This commit is contained in:
James Cammarata 2014-10-15 17:59:51 -07:00
commit 1d04e4b3d2
5 changed files with 122 additions and 13 deletions

View file

@ -38,9 +38,7 @@ class AnsibleError(Exception):
def _get_line_from_file(self, filename, line_number):
with open(filename, 'r') as f:
lines = f.readlines()
if line_number < len(lines):
return lines[line_number]
return None
return lines[line_number]
def _get_extended_error(self):
error_message = ''

View file

@ -112,7 +112,6 @@ class PluginLoader:
for basedir in _basedirs:
fullpath = os.path.realpath(os.path.join(basedir, self.subdir))
if os.path.isdir(fullpath):
files = glob.glob("%s/*" % fullpath)
# allow directories to be two levels deep