fix: replace iteritems to items
This commit is contained in:
parent
d27714948f
commit
69a6d0fb03
7 changed files with 9 additions and 9 deletions
|
@ -21,7 +21,7 @@ class SensuAsset:
|
||||||
}
|
}
|
||||||
|
|
||||||
def has_changed(self, options):
|
def has_changed(self, options):
|
||||||
for option, value in self.options.iteritems():
|
for option, value in self.options.items():
|
||||||
if (options[option] or value) and options[option] != value:
|
if (options[option] or value) and options[option] != value:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class SensuCheck:
|
||||||
if len(new_labels) != len(old_labels):
|
if len(new_labels) != len(old_labels):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
for old_label, old_value in old_labels.iteritems():
|
for old_label, old_value in old_labels.items():
|
||||||
if old_label in new_labels and new_labels[old_label] == old_value:
|
if old_label in new_labels and new_labels[old_label] == old_value:
|
||||||
continue
|
continue
|
||||||
return True
|
return True
|
||||||
|
@ -39,7 +39,7 @@ class SensuCheck:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
data.pop('metadata')
|
data.pop('metadata')
|
||||||
for option, value in data.iteritems():
|
for option, value in data.items():
|
||||||
if not option in options:
|
if not option in options:
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -22,14 +22,14 @@ class SensuClusterRole:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
for i in range(0, len(self.options['rules'])):
|
for i in range(0, len(self.options['rules'])):
|
||||||
for rule, value in self.options['rules'][i].iteritems():
|
for rule, value in self.options['rules'][i].items():
|
||||||
if not rule in options['rules'][i]:
|
if not rule in options['rules'][i]:
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
elif options['rules'][i][rule] != value:
|
elif options['rules'][i][rule] != value:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
for rule, value in options['rules'][i].iteritems():
|
for rule, value in options['rules'][i].items():
|
||||||
if not rule in self.options['rules'][i]:
|
if not rule in self.options['rules'][i]:
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -18,7 +18,7 @@ class SensuFilter:
|
||||||
self.options.pop('metadata')
|
self.options.pop('metadata')
|
||||||
|
|
||||||
def has_changed(self, options):
|
def has_changed(self, options):
|
||||||
for option, value in self.options.iteritems():
|
for option, value in self.options.items():
|
||||||
if not option in options:
|
if not option in options:
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -18,7 +18,7 @@ class SensuHandler:
|
||||||
self.options.pop('metadata')
|
self.options.pop('metadata')
|
||||||
|
|
||||||
def has_changed(self, options):
|
def has_changed(self, options):
|
||||||
for option, value in self.options.iteritems():
|
for option, value in self.options.items():
|
||||||
if not option in options:
|
if not option in options:
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -18,7 +18,7 @@ class SensuMutator:
|
||||||
self.options.pop('metadata')
|
self.options.pop('metadata')
|
||||||
|
|
||||||
def has_changed(self, options):
|
def has_changed(self, options):
|
||||||
for option, value in self.options.iteritems():
|
for option, value in self.options.items():
|
||||||
if not option in options:
|
if not option in options:
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -21,7 +21,7 @@ class SensuUser:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def has_changed(self, options):
|
def has_changed(self, options):
|
||||||
for option, value in self.options.iteritems():
|
for option, value in self.options.items():
|
||||||
if options[option] != value:
|
if options[option] != value:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue