Permalink
Browse files

Merge pull request #29283 from cachedout/style_29139

Single-quotes and use format
  • Loading branch information...
cachedout committed Nov 30, 2015
2 parents 3aa84b6 + d764497 commit df1f0d93c7e19d76b134e9826e23fc29f9a161f7
Showing with 7 additions and 7 deletions.
  1. +1 −1 salt/roster/flat.py
  2. +6 −6 salt/roster/range.py
View
@@ -152,5 +152,5 @@ def _convert_range_to_list(tgt, range_server):
try:
return r.expand(tgt)
except seco.range.RangeException as err:
log.error('Range server exception: %s', err)
log.error('Range server exception: {0}'.format(err))
return []
View
@@ -23,7 +23,7 @@
import seco.range
HAS_RANGE = True
except ImportError:
log.error("Unable to load range library")
log.error('Unable to load range library')
# pylint: enable=import-error
@@ -37,16 +37,16 @@ def targets(tgt, tgt_type='range', **kwargs):
'''
r = seco.range.Range(__opts__['range_server'])
log.debug("Range connection to '%s' established", __opts__['range_server'])
log.debug('Range connection to \'{0}\' established'.format(__opts__['range_server']))
hosts = []
try:
log.debug("Querying range for '%s'", tgt)
log.debug('Querying range for \'{0}\''.format(tgt))
hosts = r.expand(tgt)
except seco.range.RangeException as err:
log.error('Range server exception: %s', err)
return {}
log.debug("Range responded with: '%s'", hosts)
log.debug('Range responded with: \'{0}\''.format(hosts))
# Currently we only support giving a raw range entry, no target filtering supported other than what range returns :S
tgt_func = {
@@ -55,12 +55,12 @@ def targets(tgt, tgt_type='range', **kwargs):
# 'glob': target_glob,
}
log.debug("Filtering using tgt_type: '%s'", tgt_type)
log.debug('Filtering using tgt_type: \'{0}\''.format(tgt_type))
try:
targeted_hosts = tgt_func[tgt_type](tgt, hosts)
except KeyError:
raise NotImplementedError
log.debug("Targeting data for salt-ssh: '%s'", targeted_hosts)
log.debug('Targeting data for salt-ssh: \'{0}\''.format(targeted_hosts))
return targeted_hosts

0 comments on commit df1f0d9

Please sign in to comment.