Do check before calling super().__init__()

This commit is contained in:
Christophe Bedard 2020-01-01 12:46:44 -05:00
parent d35c4c3b51
commit 3dcf1cd303

View file

@ -40,12 +40,12 @@ class MemoryUsageDataModelUtil(DataModelUtil):
:param userspace: the userspace data model object to use :param userspace: the userspace data model object to use
:param kernel: the kernel data model object to use :param kernel: the kernel data model object to use
""" """
# Not giving any model to the base class; we'll own them ourselves
super().__init__(None)
if userspace is None and kernel is None: if userspace is None and kernel is None:
raise RuntimeError('must provide at least one (userspace or kernel) data model!') raise RuntimeError('must provide at least one (userspace or kernel) data model!')
# Not giving any model to the base class; we'll own them ourselves
super().__init__(None)
self.data_ust = userspace self.data_ust = userspace
self.data_kernel = kernel self.data_kernel = kernel