From 97c2be57d10335ec446b271b5d8e815fdf7b7f73 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Thu, 8 Oct 2020 15:49:22 -0500 Subject: [PATCH] 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. --- src/Mod/Show/Containers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Show/Containers.py b/src/Mod/Show/Containers.py index 3076a657d2..29fea509ba 100644 --- a/src/Mod/Show/Containers.py +++ b/src/Mod/Show/Containers.py @@ -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