AC-1278 Reduced the level of pickiness expressed by inventory_import regarding filenames.

This commit is contained in:
Chris Church
2014-05-15 13:08:48 -04:00
parent c7ed154149
commit 6d0da4672d
2 changed files with 7 additions and 3 deletions

View File

@@ -430,6 +430,8 @@ def load_inventory_source(source, all_group=None, group_filter_re=None,
original_all_group = all_group
if not os.path.exists(source):
raise IOError('Source does not exist: %s' % source)
source = os.path.join(os.path.dirname(source) or os.getcwd(), source)
source = os.path.normpath(os.path.abspath(source))
if os.path.isdir(source):
all_group = all_group or MemGroup('all', source)
for filename in glob.glob(os.path.join(source, '*')):