iscsi more linting

Make flake8 happy

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/3276/head
Sébastien Han 2018-10-30 14:45:31 +01:00 committed by mergify[bot]
parent fd72f1dd0d
commit 8843f48222
2 changed files with 22 additions and 22 deletions

View File

@ -34,17 +34,17 @@ author:
""" """
import os import os # noqa E402
import logging import logging # noqa E402
import socket import socket # noqa E402
from logging.handlers import RotatingFileHandler from logging.handlers import RotatingFileHandler # noqa E402
from ansible.module_utils.basic import * from ansible.module_utils.basic import * # noqa E402
import ceph_iscsi_config.settings as settings import ceph_iscsi_config.settings as settings # noqa E402
from ceph_iscsi_config.common import Config from ceph_iscsi_config.common import Config # noqa E402
from ceph_iscsi_config.lio import LIO, Gateway from ceph_iscsi_config.lio import LIO, Gateway # noqa E402
from ceph_iscsi_config.utils import ipv4_addresses, get_ip from ceph_iscsi_config.utils import ipv4_addresses, get_ip # noqa E402
__author__ = 'pcuzner@redhat.com' __author__ = 'pcuzner@redhat.com'
@ -70,7 +70,7 @@ def delete_group(module, image_list, cfg):
def delete_rbd(module, rbd_path): def delete_rbd(module, rbd_path):
logger.debug("issuing delete for {}".format(rbd_path)) logger.debug("issuing delete for {}".format(rbd_path))
rm_cmd = 'rbd --no-progress --conf {} rm {}'.format(settings.config.cephconf, rm_cmd = 'rbd --no-progress --conf {} rm {}'.format(settings.config.cephconf, # noqa E501
rbd_path) rbd_path)
rc, rm_out, err = module.run_command(rm_cmd, use_unsafe_shell=True) rc, rm_out, err = module.run_command(rm_cmd, use_unsafe_shell=True)
logger.debug("delete RC = {}, {}".format(rc, rm_out, err)) logger.debug("delete RC = {}, {}".format(rc, rm_out, err))
@ -109,7 +109,7 @@ def ansible_main():
} }
} }
module = AnsibleModule(argument_spec=fields, module = AnsibleModule(argument_spec=fields, # noqa F405
supports_check_mode=False) supports_check_mode=False)
run_mode = module.params['mode'] run_mode = module.params['mode']

View File

@ -34,17 +34,17 @@ author:
""" """
import os import os # noqa E402
import logging import logging # noqa E402
import socket import socket # noqa E402
from logging.handlers import RotatingFileHandler from logging.handlers import RotatingFileHandler # noqa E402
from ansible.module_utils.basic import * from ansible.module_utils.basic import * # noqa E402
import ceph_iscsi_config.settings as settings import ceph_iscsi_config.settings as settings # noqa E402
from ceph_iscsi_config.common import Config from ceph_iscsi_config.common import Config # noqa E402
from ceph_iscsi_config.lio import LIO, Gateway from ceph_iscsi_config.lio import LIO, Gateway # noqa E402
from ceph_iscsi_config.utils import ipv4_addresses, get_ip from ceph_iscsi_config.utils import ipv4_addresses, get_ip # noqa E402
__author__ = 'pcuzner@redhat.com' __author__ = 'pcuzner@redhat.com'
@ -70,7 +70,7 @@ def delete_group(module, image_list, cfg):
def delete_rbd(module, rbd_path): def delete_rbd(module, rbd_path):
logger.debug("issuing delete for {}".format(rbd_path)) logger.debug("issuing delete for {}".format(rbd_path))
rm_cmd = 'rbd --no-progress --conf {} rm {}'.format(settings.config.cephconf, rm_cmd = 'rbd --no-progress --conf {} rm {}'.format(settings.config.cephconf, # noqa E501
rbd_path) rbd_path)
rc, rm_out, err = module.run_command(rm_cmd, use_unsafe_shell=True) rc, rm_out, err = module.run_command(rm_cmd, use_unsafe_shell=True)
logger.debug("delete RC = {}, {}".format(rc, rm_out, err)) logger.debug("delete RC = {}, {}".format(rc, rm_out, err))
@ -109,7 +109,7 @@ def ansible_main():
} }
} }
module = AnsibleModule(argument_spec=fields, module = AnsibleModule(argument_spec=fields, # noqa F405
supports_check_mode=False) supports_check_mode=False)
run_mode = module.params['mode'] run_mode = module.params['mode']