PEP 8 W291 whitespace cleanup.

This commit is contained in:
Matt Clay 2017-01-27 15:20:31 -08:00
commit d913f69ba1
166 changed files with 493 additions and 565 deletions

View file

@ -776,7 +776,7 @@ def get_cache(module):
if rc == 0:
break
if rc != 0:
module.fail_json(msg='Updating the cache to correct corrupt package lists failed:\n%s\n%s' % (str(e), str(so) + str(se)))
module.fail_json(msg='Updating the cache to correct corrupt package lists failed:\n%s\n%s' % (str(e), str(so) + str(se)))
# try again
cache = apt.Cache()
else:

View file

@ -2,8 +2,8 @@
# -*- coding: utf-8 -*-
# (c) 2013, Evgenii Terechkov
# Written by Evgenii Terechkov <evg@altlinux.org>
# Based on urpmi module written by Philippe Makowski <philippem@mageia.org>
# Written by Evgenii Terechkov <evg@altlinux.org>
# Based on urpmi module written by Philippe Makowski <philippem@mageia.org>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View file

@ -179,7 +179,7 @@ class Homebrew(object):
\+ # plusses
- # dashes
: # colons (for URLs)
@ # at-sign
@ # at-sign
'''
INVALID_PATH_REGEX = _create_regex_group(VALID_PATH_CHARS)

View file

@ -157,7 +157,7 @@ def install_overlay(module, name, list_url=None):
layman = init_layman(layman_conf)
if layman.is_installed(name):
return False
return False
if module.check_mode:
mymsg = 'Would add layman repo \'' + name + '\''

View file

@ -4,7 +4,7 @@
# (c) 2013, bleader
# Written by bleader <bleader@ratonland.org>
# Based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com>
# that was based on pacman module written by Afterburn <http://github.com/afterburn>
# that was based on pacman module written by Afterburn <http://github.com/afterburn>
# that was based on apt module written by Matthew Williams <matthew@flowroute.com>
#
# This module is free software: you can redistribute it and/or modify
@ -86,7 +86,7 @@ options:
required: false
choices: [ "yes", "no" ]
default: no
author: "bleader (@bleader)"
author: "bleader (@bleader)"
notes:
- When using pkgsite, be careful that already in cache packages won't be downloaded again.
'''
@ -102,7 +102,7 @@ EXAMPLES = '''
name: foo,bar
annotation: '+test1=baz,-test2,:test3=foobar'
# Remove packages foo and bar
# Remove packages foo and bar
- pkgng:
name: foo,bar
state: absent

View file

@ -27,7 +27,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
DOCUMENTATION = '''
---
module: pkgutil
module: pkgutil
short_description: Manage CSW-Packages on Solaris
description:
- Manages CSW packages (SVR4 format) on Solaris 10 and 11.
@ -112,7 +112,7 @@ def package_install(module, state, name, site, update_catalog):
if site is not None:
cmd += [ '-t', site ]
if state == 'latest':
cmd += [ '-f' ]
cmd += [ '-f' ]
cmd.append(name)
(rc, out, err) = run_command(module, cmd)
return (rc, out, err)
@ -186,7 +186,7 @@ def main():
else:
if not package_latest(module, name, site):
if module.check_mode:
module.exit_json(changed=True)
module.exit_json(changed=True)
(rc, out, err) = package_upgrade(module, name, site, update_catalog)
if len(out) > 75:
out = out[:75] + '...'

View file

@ -157,7 +157,7 @@ def run_command(module, cmd):
def package_install(module, name, src, proxy, response_file, zone, category):
adminfile = create_admin_file()
cmd = [ 'pkgadd', '-n']
cmd = [ 'pkgadd', '-n']
if zone == 'current':
cmd += [ '-G' ]
cmd += [ '-a', adminfile, '-d', src ]

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# (c) 2013, Philippe Makowski
# Written by Philippe Makowski <philippem@mageia.org>
# Written by Philippe Makowski <philippem@mageia.org>
# Based on apt module written by Matthew Williams <matthew@flowroute.com>
#
# This module is free software: you can redistribute it and/or modify
@ -76,16 +76,16 @@ EXAMPLES = '''
pkg: foo
state: absent
# description: remove packages foo and bar
# description: remove packages foo and bar
- urpmi:
pkg: foo,bar
state: absent
# description: update the package database (urpmi.update -a -q) and install bar (bar will be the updated if a newer version exists)
# description: update the package database (urpmi.update -a -q) and install bar (bar will be the updated if a newer version exists)
- urpmi:
name: bar
state: present
update_cache: yes
update_cache: yes
'''

View file

@ -434,7 +434,7 @@ def is_update(module, repoq, pkgspec, conf_file, qf=def_qf, en_repos=None, dis_r
if not pkgs:
e,m,u = my.pkgSack.matchPackageNames([pkgspec])
pkgs = e + m
updates = my.doPackageLists(pkgnarrow='updates').updates
updates = my.doPackageLists(pkgnarrow='updates').updates
except Exception:
e = get_exception()
module.fail_json(msg="Failure talking to yum: %s" % e)
@ -524,9 +524,9 @@ def what_provides(module, repoq, req_spec, conf_file, qf=def_qf, en_repos=None,
return set()
def transaction_exists(pkglist):
"""
checks the package list to see if any packages are
involved in an incomplete transaction
"""
checks the package list to see if any packages are
involved in an incomplete transaction
"""
conflicts = []
@ -824,7 +824,7 @@ def remove(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, in
res['results'].append(out)
res['msg'] = err
# compile the results into one batch. If anything is changed
# compile the results into one batch. If anything is changed
# then mark changed
# at the end - if we've end up failed then fail out of the rest
# of the process

View file

@ -87,7 +87,7 @@ options:
version_added: "2.1"
auto_import_keys:
description:
- Automatically import the gpg signing key of the new or changed repository.
- Automatically import the gpg signing key of the new or changed repository.
- Has an effect only if state is I(present). Has no effect on existing (unchanged) repositories or in combination with I(absent).
- Implies runrefresh.
required: false
@ -111,7 +111,7 @@ options:
version_added: "2.2"
requirements:
requirements:
- "zypper >= 1.0 # included in openSuSE >= 11.1 or SuSE Linux Enterprise Server/Desktop >= 11.0"
- python-xml
'''
@ -246,7 +246,7 @@ def addmodify_repo(module, repodata, old_repos, zypper_version, warnings):
cmd.extend(['--name', repodata['name']])
# priority on addrepo available since 1.12.25
# https://github.com/openSUSE/zypper/blob/b9b3cb6db76c47dc4c47e26f6a4d2d4a0d12b06d/package/zypper.changes#L327-L336
# https://github.com/openSUSE/zypper/blob/b9b3cb6db76c47dc4c47e26f6a4d2d4a0d12b06d/package/zypper.changes#L327-L336
if repodata['priority']:
if zypper_version >= LooseVersion('1.12.25'):
cmd.extend(['--priority', str(repodata['priority'])])