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):
|
||||
for option, value in self.options.iteritems():
|
||||
for option, value in self.options.items():
|
||||
if (options[option] or value) and options[option] != value:
|
||||
return True
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class SensuCheck:
|
|||
if len(new_labels) != len(old_labels):
|
||||
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:
|
||||
continue
|
||||
return True
|
||||
|
@ -39,7 +39,7 @@ class SensuCheck:
|
|||
return True
|
||||
|
||||
data.pop('metadata')
|
||||
for option, value in data.iteritems():
|
||||
for option, value in data.items():
|
||||
if not option in options:
|
||||
if value:
|
||||
return True
|
||||
|
|
|
@ -22,14 +22,14 @@ class SensuClusterRole:
|
|||
return True
|
||||
|
||||
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 value:
|
||||
return True
|
||||
elif options['rules'][i][rule] != value:
|
||||
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 value:
|
||||
return True
|
||||
|
|
|
@ -18,7 +18,7 @@ class SensuFilter:
|
|||
self.options.pop('metadata')
|
||||
|
||||
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 value:
|
||||
return True
|
||||
|
|
|
@ -18,7 +18,7 @@ class SensuHandler:
|
|||
self.options.pop('metadata')
|
||||
|
||||
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 value:
|
||||
return True
|
||||
|
|
|
@ -18,7 +18,7 @@ class SensuMutator:
|
|||
self.options.pop('metadata')
|
||||
|
||||
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 value:
|
||||
return True
|
||||
|
|
|
@ -21,7 +21,7 @@ class SensuUser:
|
|||
pass
|
||||
|
||||
def has_changed(self, options):
|
||||
for option, value in self.options.iteritems():
|
||||
for option, value in self.options.items():
|
||||
if options[option] != value:
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue