Show: add argument to NotAContainerError class constructor

The class `NotAContainerError` is used as an exception.
Where it is used it is initialized with an argument,
but the definition didn't accept one; now we accept an argument
in the constructor.
This commit is contained in:
vocx-fc
2020-10-08 15:49:22 -05:00
committed by Yorik van Havre
parent f54761510c
commit 9be9620ae2

View File

@@ -255,7 +255,7 @@ def VisGroupChain(feat):
class ContainerError(RuntimeError):
pass
class NotAContainerError(ContainerError):
def __init__(self):
ContainerError.__init__(self, u"{obj} is not recognized as container".format(obj.Name))
def __init__(self, name="None"):
ContainerError.__init__(self, "'{}' is not recognized as container".format(name))
class ContainerTreeError(ContainerError):
pass