From bcff6c18bcaafe9781f09341e8c01971dd79aa54 Mon Sep 17 00:00:00 2001 From: Watson Sato Date: Tue, 20 Feb 2024 18:15:38 +0100 Subject: [PATCH] Add python2 support to raise from --- ssg/controls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssg/controls.py b/ssg/controls.py index 262724e75e4a..5895078f56db 100644 --- a/ssg/controls.py +++ b/ssg/controls.py @@ -1,3 +1,5 @@ +from future.utils import raise_from + import collections import os import copy @@ -190,7 +192,7 @@ def add_references(self, reference_type, rules): "Please remove any duplicate listing of rule '%s' in " "control '%s'." % ( rule.id_, self.id)) - raise ValueError(msg) from exc + raise_from(ValueError(msg), exc) class Level(ssg.entities.common.XCCDFEntity):