Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thatch45 committed Feb 5, 2014
1 parent e0bf498 commit 1ba822e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
3 changes: 1 addition & 2 deletions salt/client/__init__.py
Expand Up @@ -184,7 +184,6 @@ def gather_job_info(self, jid, tgt, tgt_type, minions, **kwargs):
Return the information about a given job
'''
log.debug('Checking whether jid %s is still running', jid)

timeout = self.opts['gather_job_timeout']

arg = [jid]
Expand Down Expand Up @@ -911,7 +910,7 @@ def get_iter_returns(
if last_time:
if len(found) < len(minions):
log.info('jid %s minions %s did not return in time',
jid, (minions -found))
jid, (minions - found))
break
if int(time.time()) > timeout_at:
# The timeout has been reached, check the jid to see if the
Expand Down
1 change: 1 addition & 0 deletions salt/grains/rest_sample.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
'''
Generate baseline proxy minion grains
'''
__proxyenabled__ = ['rest_sample']

Expand Down
7 changes: 1 addition & 6 deletions salt/modules/rest_package.py
Expand Up @@ -4,13 +4,8 @@
'''

# Import python libs
import glob
import logging
import os
import stat

# Import salt libs
import salt.utils

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -73,7 +68,7 @@ def installed(
**kwargs):

p = __opts__['proxyobject'].package_status(name)
if version == None:
if version is None:
if 'ret' in p:
return str(p['ret'])
else:
Expand Down
11 changes: 3 additions & 8 deletions salt/proxy/rest_sample.py
Expand Up @@ -3,24 +3,22 @@
This is a simple proxy-minion designed to connect to and communicate with
the bottle-based web service contained in salt/tests/rest.py.
Note this example needs the 'requests' library.
Note this example needs the 'requests' library.
Requests is not a hard dependency for Salt
'''

# Import python libs
import logging
import os
import requests
HAS_REST_EXAMPLE = True

__proxyenabled__ = ['rest_sample']


class Proxyconn(object):
'''
Interface with the REST sample web service (rest.py at
https://github.com/cro/salt-proxy-rest)
'''

def __init__(self, details):
self.url = details['url']
self.grains_cache = {}
Expand All @@ -31,10 +29,7 @@ def id(self, opts):
'''
r = requests.get(self.url+'id')
return r.text.encode('ascii', 'ignore')

'''
Return the type of proxy
'''
# Return the type of proxy
return 'rest_example'

def grains(self):
Expand Down
2 changes: 1 addition & 1 deletion salt/states/pkgrepo.py
Expand Up @@ -58,7 +58,7 @@
'''

# Import salt libs
from salt.modules.apt_pkg import _strip_uri
from salt.modules.aptpkg import _strip_uri
from salt.state import STATE_INTERNAL_KEYWORDS as _STATE_INTERNAL_KEYWORDS


Expand Down

0 comments on commit 1ba822e

Please sign in to comment.