mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Don't check if keys are str
Our type checking should take care of that.
This commit is contained in:
parent
807e8410c0
commit
ef2250b889
1 changed files with 21 additions and 25 deletions
|
@ -45,7 +45,6 @@ class GcodeStartEndFormatter(Formatter):
|
|||
# The kwargs dictionary contains a dictionary for each stack (with a string of the extruder_nr as their key),
|
||||
# and a default_extruder_nr to use when no extruder_nr is specified
|
||||
|
||||
if isinstance(key, str):
|
||||
try:
|
||||
extruder_nr = int(kwargs["default_extruder_nr"])
|
||||
except ValueError:
|
||||
|
@ -63,7 +62,7 @@ class GcodeStartEndFormatter(Formatter):
|
|||
Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0])
|
||||
elif len(key_fragments) != 1:
|
||||
Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key)
|
||||
return "{" + str(key) + "}"
|
||||
return "{" + key + "}"
|
||||
|
||||
key = key_fragments[0]
|
||||
try:
|
||||
|
@ -71,9 +70,6 @@ class GcodeStartEndFormatter(Formatter):
|
|||
except KeyError:
|
||||
Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key)
|
||||
return "{" + key + "}"
|
||||
else:
|
||||
Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key)
|
||||
return "{" + str(key) + "}"
|
||||
|
||||
|
||||
## Job class that builds up the message of scene data to send to CuraEngine.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue