mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 13:21:25 -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
|
@ -172,8 +172,8 @@ def docker_inspect(args, container_id):
|
|||
except SubprocessError as ex:
|
||||
try:
|
||||
return json.loads(ex.stdout)
|
||||
except:
|
||||
raise ex # pylint: disable=locally-disabled, raising-bad-type
|
||||
except Exception:
|
||||
raise ex
|
||||
|
||||
|
||||
def docker_network_disconnect(args, container_id, network):
|
||||
|
@ -200,8 +200,8 @@ def docker_network_inspect(args, network):
|
|||
except SubprocessError as ex:
|
||||
try:
|
||||
return json.loads(ex.stdout)
|
||||
except:
|
||||
raise ex # pylint: disable=locally-disabled, raising-bad-type
|
||||
except Exception:
|
||||
raise ex
|
||||
|
||||
|
||||
def docker_exec(args, container_id, cmd, options=None, capture=False, stdin=None, stdout=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue