diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2016-11-28 15:32:46 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2016-11-29 12:41:14 -0500 |
commit | cef42e2541f7ddeaf284b1350eed7f4e46234fe9 (patch) | |
tree | ec51eb6d9dc1d48daf336054ea5688e0f3107f13 /roles/etcd_common/library | |
parent | e5f352d6f7c7bd91c2784152a8805f6e22f407db (diff) | |
download | openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.tar.gz openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.tar.bz2 openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.tar.xz openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.zip |
update tests and flake8/pylint fixes
Diffstat (limited to 'roles/etcd_common/library')
-rwxr-xr-x | roles/etcd_common/library/delegated_serial_command.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/roles/etcd_common/library/delegated_serial_command.py b/roles/etcd_common/library/delegated_serial_command.py index 84d4f97c2..0cab1ca88 100755 --- a/roles/etcd_common/library/delegated_serial_command.py +++ b/roles/etcd_common/library/delegated_serial_command.py @@ -24,12 +24,9 @@ ''' delegated_serial_command ''' -import copy -import sys import datetime +import errno import glob -import traceback -import re import shlex import os import fcntl @@ -133,6 +130,7 @@ OPTIONS = {'chdir': None, 'lockfile': None, 'timeout': None} + def check_command(commandline): ''' Check provided command ''' arguments = {'chown': 'owner', 'chmod': 'mode', 'chgrp': 'group', @@ -160,7 +158,7 @@ def check_command(commandline): # pylint: disable=too-many-statements,too-many-branches,too-many-locals def main(): ''' Main module function ''' - module = AnsibleModule( + module = AnsibleModule( # noqa: F405 argument_spec=dict( _uses_shell=dict(type='bool', default=False), command=dict(required=True), @@ -220,9 +218,9 @@ def main(): ) if removes: - # do not run the command if the line contains removes=filename - # and the filename does not exist. This allows idempotence - # of command executions. + # do not run the command if the line contains removes=filename + # and the filename does not exist. This allows idempotence + # of command executions. path = os.path.expanduser(removes) if not glob.glob(path): module.exit_json( @@ -268,7 +266,9 @@ def main(): iterated=iterated ) + # import module snippets -from ansible.module_utils.basic import * +# pylint: disable=wrong-import-position +from ansible.module_utils.basic import * # noqa: F402,F403 main() |