Commit b0838f78 authored by Flavio TARSETTI's avatar Flavio TARSETTI Committed by Samuel GAIST
Browse files

[widgets][toolchaineditor] patching ValueError with KeyError for BlockType classmethod

parent 606cfa68
......@@ -762,8 +762,8 @@ class BlockType(Enum):
def from_name(cls, name):
return cls[name]
except ValueError:
raise ValueError("{} is not a valid block type".format(name))
except KeyError:
raise KeyError("{} is not a valid block type".format(name))
class Block(QGraphicsObject):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment