mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 22:31:25 -07:00
Support comments in ansible-test flat files.
This commit is contained in:
parent
cb4bf04be6
commit
5a3000af19
13 changed files with 135 additions and 96 deletions
|
@ -12,6 +12,7 @@ import sys
|
|||
|
||||
from lib.util import (
|
||||
ApplicationError,
|
||||
read_lines_without_comments,
|
||||
)
|
||||
|
||||
MODULE_EXTENSIONS = '.py', '.ps1'
|
||||
|
@ -511,8 +512,8 @@ class IntegrationTarget(CompletionTarget):
|
|||
# static_aliases
|
||||
|
||||
try:
|
||||
with open(os.path.join(path, 'aliases'), 'r') as aliases_file:
|
||||
static_aliases = tuple(aliases_file.read().splitlines())
|
||||
aliases_path = os.path.join(path, 'aliases')
|
||||
static_aliases = tuple(read_lines_without_comments(aliases_path, remove_blank_lines=True))
|
||||
except IOError as ex:
|
||||
if ex.errno != errno.ENOENT:
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue