mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-30 20:20:21 -07:00
Fix infrequent PEP 8 issues.
This commit is contained in:
parent
13fc909058
commit
63b1e0c277
31 changed files with 41 additions and 50 deletions
|
@ -133,10 +133,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
from time import time
|
|
||||||
import sys
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import urllib, urllib2, base64
|
|
||||||
|
|
||||||
|
|
||||||
def get_log_filename():
|
def get_log_filename():
|
||||||
|
|
|
@ -62,7 +62,7 @@ CACHE_DIR = os.path.join(base_dir, ".spacewalk_reports")
|
||||||
CACHE_AGE = 300 # 5min
|
CACHE_AGE = 300 # 5min
|
||||||
INI_FILE = os.path.join(base_dir, "spacewalk.ini")
|
INI_FILE = os.path.join(base_dir, "spacewalk.ini")
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
if not os.path.exists(SW_REPORT):
|
if not os.path.exists(SW_REPORT):
|
||||||
print('Error: %s is required for operation.' % (SW_REPORT), file=sys.stderr)
|
print('Error: %s is required for operation.' % (SW_REPORT), file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
@ -32,7 +32,8 @@ Tested with Zabbix Server 2.0.6.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import os, sys
|
import os
|
||||||
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,10 @@ class CLI(with_metaclass(ABCMeta, object)):
|
||||||
_CONST = re.compile(r"C\(([^)]+)\)")
|
_CONST = re.compile(r"C\(([^)]+)\)")
|
||||||
|
|
||||||
PAGER = 'less'
|
PAGER = 'less'
|
||||||
LESS_OPTS = 'FRSX' # -F (quit-if-one-screen) -R (allow raw ansi control chars)
|
|
||||||
|
# -F (quit-if-one-screen) -R (allow raw ansi control chars)
|
||||||
# -S (chop long lines) -X (disable termcap init and de-init)
|
# -S (chop long lines) -X (disable termcap init and de-init)
|
||||||
|
LESS_OPTS = 'FRSX'
|
||||||
|
|
||||||
def __init__(self, args, callback=None):
|
def __init__(self, args, callback=None):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -560,9 +560,9 @@ class ZipArchive(object):
|
||||||
cmd.extend(self.opts)
|
cmd.extend(self.opts)
|
||||||
cmd.append(self.src)
|
cmd.append(self.src)
|
||||||
# NOTE: Including (changed) files as arguments is problematic (limits on command line/arguments)
|
# NOTE: Including (changed) files as arguments is problematic (limits on command line/arguments)
|
||||||
# if self.includes:
|
# if self.includes:
|
||||||
# NOTE: Command unzip has this strange behaviour where it expects quoted filenames to also be escaped
|
# NOTE: Command unzip has this strange behaviour where it expects quoted filenames to also be escaped
|
||||||
# cmd.extend(map(shell_escape, self.includes))
|
# cmd.extend(map(shell_escape, self.includes))
|
||||||
if self.excludes:
|
if self.excludes:
|
||||||
cmd.extend([ '-x' ] + self.excludes)
|
cmd.extend([ '-x' ] + self.excludes)
|
||||||
cmd.extend([ '-d', self.dest ])
|
cmd.extend([ '-d', self.dest ])
|
||||||
|
|
|
@ -175,8 +175,9 @@ def install_packages(module, pkgng_path, packages, cached, pkgsite, dir_arg):
|
||||||
else:
|
else:
|
||||||
pkgsite = "-r %s" % (pkgsite)
|
pkgsite = "-r %s" % (pkgsite)
|
||||||
|
|
||||||
batch_var = 'env BATCH=yes' # This environment variable skips mid-install prompts,
|
# This environment variable skips mid-install prompts,
|
||||||
# setting them to their default values.
|
# setting them to their default values.
|
||||||
|
batch_var = 'env BATCH=yes'
|
||||||
|
|
||||||
if not module.check_mode and not cached:
|
if not module.check_mode and not cached:
|
||||||
if old_pkgng:
|
if old_pkgng:
|
||||||
|
|
|
@ -279,7 +279,8 @@ class ACMEDirectory(object):
|
||||||
|
|
||||||
self.directory = simple_get(self.module,self.directory_root)
|
self.directory = simple_get(self.module,self.directory_root)
|
||||||
|
|
||||||
def __getitem__(self, key): return self.directory[key]
|
def __getitem__(self, key):
|
||||||
|
return self.directory[key]
|
||||||
|
|
||||||
def get_nonce(self,resource=None):
|
def get_nonce(self,resource=None):
|
||||||
url = self.directory_root
|
url = self.directory_root
|
||||||
|
|
|
@ -40,6 +40,7 @@ else:
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
|
|
||||||
|
|
||||||
class LookupModule(LookupBase):
|
class LookupModule(LookupBase):
|
||||||
|
|
||||||
def _fix_sort_parameter(self, sort_parameter):
|
def _fix_sort_parameter(self, sort_parameter):
|
||||||
|
|
|
@ -220,7 +220,6 @@ lib/ansible/modules/cloud/softlayer/sl_vm.py
|
||||||
lib/ansible/modules/cloud/vmware/vca_fw.py
|
lib/ansible/modules/cloud/vmware/vca_fw.py
|
||||||
lib/ansible/modules/cloud/vmware/vmware_guest.py
|
lib/ansible/modules/cloud/vmware/vmware_guest.py
|
||||||
lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py
|
lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py
|
||||||
lib/ansible/modules/cloud/vmware/vmware_vm_vss_dvs_migrate.py
|
|
||||||
lib/ansible/modules/cloud/vmware/vmware_vswitch.py
|
lib/ansible/modules/cloud/vmware/vmware_vswitch.py
|
||||||
lib/ansible/modules/cloud/vmware/vsphere_copy.py
|
lib/ansible/modules/cloud/vmware/vsphere_copy.py
|
||||||
lib/ansible/modules/cloud/vmware/vsphere_guest.py
|
lib/ansible/modules/cloud/vmware/vsphere_guest.py
|
||||||
|
@ -317,8 +316,6 @@ lib/ansible/modules/network/f5/bigip_pool.py
|
||||||
lib/ansible/modules/network/f5/bigip_pool_member.py
|
lib/ansible/modules/network/f5/bigip_pool_member.py
|
||||||
lib/ansible/modules/network/f5/bigip_virtual_server.py
|
lib/ansible/modules/network/f5/bigip_virtual_server.py
|
||||||
lib/ansible/modules/network/haproxy.py
|
lib/ansible/modules/network/haproxy.py
|
||||||
lib/ansible/modules/network/illumos/dladm_vlan.py
|
|
||||||
lib/ansible/modules/network/ios/ios_config.py
|
|
||||||
lib/ansible/modules/network/junos/junos_facts.py
|
lib/ansible/modules/network/junos/junos_facts.py
|
||||||
lib/ansible/modules/network/lldp.py
|
lib/ansible/modules/network/lldp.py
|
||||||
lib/ansible/modules/network/nmcli.py
|
lib/ansible/modules/network/nmcli.py
|
||||||
|
@ -456,7 +453,6 @@ lib/ansible/modules/system/lvg.py
|
||||||
lib/ansible/modules/system/lvol.py
|
lib/ansible/modules/system/lvol.py
|
||||||
lib/ansible/modules/system/modprobe.py
|
lib/ansible/modules/system/modprobe.py
|
||||||
lib/ansible/modules/system/ohai.py
|
lib/ansible/modules/system/ohai.py
|
||||||
lib/ansible/modules/system/open_iscsi.py
|
|
||||||
lib/ansible/modules/system/openwrt_init.py
|
lib/ansible/modules/system/openwrt_init.py
|
||||||
lib/ansible/modules/system/pam_limits.py
|
lib/ansible/modules/system/pam_limits.py
|
||||||
lib/ansible/modules/system/sefcontext.py
|
lib/ansible/modules/system/sefcontext.py
|
||||||
|
@ -498,9 +494,7 @@ lib/ansible/modules/windows/win_regedit.py
|
||||||
lib/ansible/modules/windows/win_regmerge.py
|
lib/ansible/modules/windows/win_regmerge.py
|
||||||
lib/ansible/modules/windows/win_robocopy.py
|
lib/ansible/modules/windows/win_robocopy.py
|
||||||
lib/ansible/modules/windows/win_say.py
|
lib/ansible/modules/windows/win_say.py
|
||||||
lib/ansible/modules/windows/win_share.py
|
|
||||||
lib/ansible/modules/windows/win_shell.py
|
lib/ansible/modules/windows/win_shell.py
|
||||||
lib/ansible/modules/windows/win_shortcut.py
|
|
||||||
lib/ansible/modules/windows/win_unzip.py
|
lib/ansible/modules/windows/win_unzip.py
|
||||||
lib/ansible/modules/windows/win_updates.py
|
lib/ansible/modules/windows/win_updates.py
|
||||||
lib/ansible/modules/windows/win_uri.py
|
lib/ansible/modules/windows/win_uri.py
|
||||||
|
@ -575,7 +569,6 @@ setup.py
|
||||||
test/integration/cleanup_ec2.py
|
test/integration/cleanup_ec2.py
|
||||||
test/integration/cleanup_gce.py
|
test/integration/cleanup_gce.py
|
||||||
test/integration/setup_gce.py
|
test/integration/setup_gce.py
|
||||||
test/integration/targets/async/library/async_test.py
|
|
||||||
test/units/cli/test_galaxy.py
|
test/units/cli/test_galaxy.py
|
||||||
test/units/contrib/inventory/test_vmware_inventory.py
|
test/units/contrib/inventory/test_vmware_inventory.py
|
||||||
test/units/errors/test_errors.py
|
test/units/errors/test_errors.py
|
||||||
|
|
|
@ -2,7 +2,6 @@ E101
|
||||||
E111
|
E111
|
||||||
E114
|
E114
|
||||||
E115
|
E115
|
||||||
E116
|
|
||||||
E121
|
E121
|
||||||
E122
|
E122
|
||||||
E125
|
E125
|
||||||
|
@ -10,16 +9,12 @@ E126
|
||||||
E129
|
E129
|
||||||
E131
|
E131
|
||||||
E271
|
E271
|
||||||
E272
|
|
||||||
E401
|
|
||||||
E501
|
E501
|
||||||
E701
|
E701
|
||||||
E703
|
E703
|
||||||
E704
|
|
||||||
E711
|
E711
|
||||||
E712
|
E712
|
||||||
E721
|
E721
|
||||||
W191
|
W191
|
||||||
W291
|
W291
|
||||||
W292
|
|
||||||
W293
|
W293
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue