mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Re-use stack variable
We're creating the variable but then requesting the 0th element from the list each time... That can be more logical and more efficient. Contributes to issue CURA-4243.
This commit is contained in:
parent
1a47ec85ca
commit
7745113704
1 changed files with 5 additions and 5 deletions
|
@ -651,13 +651,13 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
|
|
||||||
# HACK
|
# HACK
|
||||||
# There is a machine, check if it has authentication data. If so, keep that data.
|
# There is a machine, check if it has authentication data. If so, keep that data.
|
||||||
network_authentication_id = container_stacks[0].getMetaDataEntry("network_authentication_id")
|
network_authentication_id = stack.getMetaDataEntry("network_authentication_id")
|
||||||
network_authentication_key = container_stacks[0].getMetaDataEntry("network_authentication_key")
|
network_authentication_key = stack.getMetaDataEntry("network_authentication_key")
|
||||||
container_stacks[0].deserialize(archive.open(global_stack_file).read().decode("utf-8"))
|
stack.deserialize(archive.open(global_stack_file).read().decode("utf-8"))
|
||||||
if network_authentication_id:
|
if network_authentication_id:
|
||||||
container_stacks[0].addMetaDataEntry("network_authentication_id", network_authentication_id)
|
stack.addMetaDataEntry("network_authentication_id", network_authentication_id)
|
||||||
if network_authentication_key:
|
if network_authentication_key:
|
||||||
container_stacks[0].addMetaDataEntry("network_authentication_key", network_authentication_key)
|
stack.addMetaDataEntry("network_authentication_key", network_authentication_key)
|
||||||
|
|
||||||
elif self._resolve_strategies["machine"] == "new":
|
elif self._resolve_strategies["machine"] == "new":
|
||||||
# create a new global stack
|
# create a new global stack
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue