]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
container.py: Fix erroneous super call in ContainerError()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 23 Feb 2022 06:20:37 +0000 (11:50 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 24 Feb 2022 15:05:24 +0000 (08:05 -0700)
ContainerError erroneously passed RunError into super() during
init() time.  Fix this by passing in ContainerError().

Reported-by: LGTM
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
TJH: Fixed comment

ftests/container.py

index 9a45d1952264f1e8c488c91cc5db7df200e10a89..89920d68acc40b1d3b6d108220a756d5122180bc 100644 (file)
@@ -19,7 +19,7 @@
 # along with this library; if not, see <http://www.gnu.org/licenses>.
 #
 
-from run import Run, RunError
+from run import Run
 import consts
 import os
 
@@ -182,7 +182,7 @@ class Container(object):
 
 class ContainerError(Exception):
     def __init__(self, message, ret):
-        super(RunError, self).__init__(message)
+        super(ContainerError, self).__init__(message)
 
     def __str__(self):
         out_str = 'ContainerError:\n\tmessage = {}'.format(self.message)