Merge pull request #3099 from archtaku/develop

PEP8 fixes
This commit is contained in:
Thomas S Hatch 2012-12-31 12:02:23 -08:00
commit f5df8d7245
9 changed files with 21 additions and 21 deletions

View File

@ -189,7 +189,7 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
sources)
# Support old "repo" argument
repo = kwargs.get('repo','')
repo = kwargs.get('repo', '')
if not fromrepo and repo:
fromrepo = repo
@ -219,7 +219,7 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
)
old = list_pkgs()
__salt__['cmd.run_all'](cmd).get('stderr', '')
__salt__['cmd.run_all'](cmd)
new = list_pkgs()
return __salt__['pkg_resource.find_changes'](old, new)
@ -283,7 +283,7 @@ def upgrade(refresh=True, **kwargs):
[
{'<package>': {'old': '<old-version>',
'new': '<new-version>']
'new': '<new-version>'}
}',
...
]
@ -308,10 +308,10 @@ def upgrade(refresh=True, **kwargs):
continue
else:
ret_pkgs[pkg] = {'old': old_pkgs[pkg],
'new': new_pkgs[pkg]}
'new': new_pkgs[pkg]}
else:
ret_pkgs[pkg] = {'old': '',
'new': new_pkgs[pkg]}
'new': new_pkgs[pkg]}
return ret_pkgs

View File

@ -100,7 +100,7 @@ def install(pkgs, refresh=False, skip_verify=False, **kwargs):
__salt__['cmd.run'](cmd)
new = list_pkgs(*pkgs)
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def list_upgrades():
'''

View File

@ -267,10 +267,10 @@ def upgrade(refresh=False):
continue
else:
ret_pkgs[pkg] = {'old': old_pkgs[pkg],
'new': new_pkgs[pkg]}
'new': new_pkgs[pkg]}
else:
ret_pkgs[pkg] = {'old': '',
'new': new_pkgs[pkg]}
'new': new_pkgs[pkg]}
return ret_pkgs

View File

@ -164,7 +164,7 @@ def install(name=None, refresh=False, fromrepo=None,
sources)
# Support old "repo" argument
repo = kwargs.get('repo','')
repo = kwargs.get('repo', '')
if not fromrepo and repo:
fromrepo = repo

View File

@ -208,7 +208,7 @@ def install(name=None, refresh=False, pkgs=None, sources=None, **kwargs):
if stderr:
log.error(stderr)
new = list_pkgs()
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def upgrade():

View File

@ -121,7 +121,7 @@ def upgrade(refresh=True, **kwargs):
new = _get_pkgs()
# Return a list of the new package installed.
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def list_pkgs():
@ -205,7 +205,7 @@ def install(name, refresh=False, version=None, **kwargs):
new = _get_pkgs()
# Return a list of the new package installed.
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def remove(name, **kwargs):

View File

@ -333,9 +333,9 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
setattr(yumbase.conf, 'gpgcheck', not skip_verify)
# Get repo options from the kwargs
disablerepo = kwargs.get('disablerepo','')
enablerepo = kwargs.get('enablerepo','')
repo = kwargs.get('repo','')
disablerepo = kwargs.get('disablerepo', '')
enablerepo = kwargs.get('enablerepo', '')
repo = kwargs.get('repo', '')
# Support old "repo" argument
if not fromrepo and repo:
@ -394,7 +394,7 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
log.error('Install failed: {0}'.format(e))
new = list_pkgs()
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def upgrade():
@ -432,7 +432,7 @@ def upgrade():
log.error('Upgrade failed: {0}'.format(e))
new = list_pkgs()
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def remove(pkgs):

View File

@ -224,9 +224,9 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
return {}
# Get repo options from the kwargs
disablerepo = kwargs.get('disablerepo','')
enablerepo = kwargs.get('enablerepo','')
repo = kwargs.get('repo','')
disablerepo = kwargs.get('disablerepo', '')
enablerepo = kwargs.get('enablerepo', '')
repo = kwargs.get('repo', '')
# Support old "repo" argument
if not fromrepo and repo:

View File

@ -188,7 +188,7 @@ def install(name=None, refresh=False, pkgs=None, sources=None, **kwargs):
if stderr:
log.error(stderr)
new = list_pkgs()
return __salt__['pkg_resource.find_changes'](old,new)
return __salt__['pkg_resource.find_changes'](old, new)
def upgrade():