mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
String substitution lint fixes
This commit is contained in:
parent
925dfee9c0
commit
e4a47d460b
@ -81,7 +81,7 @@ def get_alarm(name, region=None, key=None, keyid=None, profile=None):
|
||||
if len(alarms) == 0:
|
||||
return None
|
||||
if len(alarms) > 1:
|
||||
log.error("multiple alarms matched name '%s'" % name)
|
||||
log.error("multiple alarms matched name '{0}'".format(name))
|
||||
return _metric_alarm_to_dict(alarms[0])
|
||||
|
||||
|
||||
@ -210,7 +210,7 @@ def create_or_update_alarm(
|
||||
if isinstance(dimensions, string_types):
|
||||
dimensions = json.decodestring(dimensions)
|
||||
if not isinstance(dimensions, dict):
|
||||
log.error("could not parse dimensions argument: must be json encoding of a dict: '%s'" % dimensions)
|
||||
log.error("could not parse dimensions argument: must be json encoding of a dict: '{0}'".format(dimensions))
|
||||
return False
|
||||
if isinstance(alarm_actions, string_types):
|
||||
alarm_actions = alarm_actions.split(",")
|
||||
@ -266,7 +266,7 @@ def convert_to_arn(arns, region=None, key=None, keyid=None, profile=None):
|
||||
if policy_arn:
|
||||
results.append(policy_arn)
|
||||
else:
|
||||
log.error('Could not convert: %s' % arn)
|
||||
log.error('Could not convert: {0}'.format(arn))
|
||||
else:
|
||||
results.append(arn)
|
||||
return results
|
||||
|
@ -111,7 +111,7 @@ def present(
|
||||
if alarm_details:
|
||||
for k, v in attributes.items():
|
||||
if k not in alarm_details:
|
||||
difference.append("%s=%s (new)" % (k, v))
|
||||
difference.append("{0}={1} (new)".format(k, v))
|
||||
continue
|
||||
v2 = alarm_details[k]
|
||||
if v == v2:
|
||||
@ -122,7 +122,7 @@ def present(
|
||||
continue
|
||||
if isinstance(v, int) and v == int(v2):
|
||||
continue
|
||||
difference.append("%s='%s' was: '%s'" % (k, v, v2))
|
||||
difference.append("{0}='{1}' was: '{2}'".format(k, v, v2))
|
||||
else:
|
||||
difference.append("new alarm")
|
||||
create_or_update_alarm_args = {
|
||||
|
Loading…
Reference in New Issue
Block a user