nuke: python3 compatibility issue with iteritems

This commit is contained in:
Jakub Jezek 2022-03-24 14:47:23 +01:00
parent 406247ad26
commit 1aa56e10d4
No known key found for this signature in database
GPG key ID: D8548FBF690B100A
4 changed files with 8 additions and 8 deletions

View file

@ -72,7 +72,7 @@ class LoadEffects(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -188,7 +188,7 @@ class LoadEffects(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -330,7 +330,7 @@ class LoadEffects(load.LoaderPlugin):
if isinstance(input, dict):
return {self.byteify(key): self.byteify(value)
for key, value in input.iteritems()}
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):

View file

@ -74,7 +74,7 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -194,7 +194,7 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -350,7 +350,7 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
if isinstance(input, dict):
return {self.byteify(key): self.byteify(value)
for key, value in input.iteritems()}
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):

View file

@ -240,7 +240,7 @@ class LoadGizmoInputProcess(load.LoaderPlugin):
if isinstance(input, dict):
return {self.byteify(key): self.byteify(value)
for key, value in input.iteritems()}
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):

View file

@ -25,7 +25,7 @@ class RepairNukeWriteDeadlineTab(pyblish.api.Action):
# Remove existing knobs.
knob_names = openpype.hosts.nuke.lib.get_deadline_knob_names()
for name, knob in group_node.knobs().iteritems():
for name, knob in group_node.knobs().items():
if name in knob_names:
group_node.removeKnob(knob)