diff --git a/moto/iot/models.py b/moto/iot/models.py index 1f0623eb3..2e9979bda 100644 --- a/moto/iot/models.py +++ b/moto/iot/models.py @@ -849,7 +849,9 @@ class IoTBackend(BaseBackend): ] if len(child_groups) > 0: raise InvalidRequestException( - f" Cannot delete thing group : {thing_group_name} when there are still child groups attached to it" + " Cannot delete thing group : " + + thing_group_name + + " when there are still child groups attached to it" ) thing_group = self.describe_thing_group(thing_group_name) del self.thing_groups[thing_group.arn]