fix: replace iteritems to items

This commit is contained in:
Adrien Waksberg 2020-02-13 10:00:10 +01:00
parent d27714948f
commit 69a6d0fb03
7 changed files with 9 additions and 9 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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