mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports. * Clean up ConfigParser usage in ansible-test. * Fix bare except statements in ansible-test. * Miscellaneous cleanup from PyCharm inspections. * Enable pylint no-self-use for ansible-test. * Remove obsolete pylint ignores for Python 3.7. * Fix shellcheck issuers under newer shellcheck. * Use newer path for ansible-test. * Fix issues in code-smell tests.
This commit is contained in:
parent
b60854357b
commit
ac492476e5
24 changed files with 36 additions and 128 deletions
|
@ -4,20 +4,13 @@ from __future__ import absolute_import, print_function
|
|||
import os
|
||||
import time
|
||||
|
||||
try:
|
||||
# noinspection PyPep8Naming
|
||||
import ConfigParser as configparser
|
||||
except ImportError:
|
||||
# noinspection PyUnresolvedReferences
|
||||
import configparser
|
||||
|
||||
from lib.util import (
|
||||
display,
|
||||
ApplicationError,
|
||||
is_shippable,
|
||||
run_command,
|
||||
generate_password,
|
||||
SubprocessError,
|
||||
ConfigParser,
|
||||
)
|
||||
|
||||
from lib.cloud import (
|
||||
|
@ -27,15 +20,6 @@ from lib.cloud import (
|
|||
|
||||
from lib.core_ci import (
|
||||
AnsibleCoreCI,
|
||||
InstanceConnection,
|
||||
)
|
||||
|
||||
from lib.manage_ci import (
|
||||
ManagePosixCI,
|
||||
)
|
||||
|
||||
from lib.http import (
|
||||
HttpClient,
|
||||
)
|
||||
|
||||
|
||||
|
@ -219,7 +203,7 @@ class TowerConfig(object):
|
|||
:type path: str
|
||||
:rtype: TowerConfig
|
||||
"""
|
||||
parser = configparser.RawConfigParser()
|
||||
parser = ConfigParser()
|
||||
parser.read(path)
|
||||
|
||||
keys = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue