Do check before calling super().__init__()
This commit is contained in:
parent
d35c4c3b51
commit
3dcf1cd303
1 changed files with 3 additions and 3 deletions
|
@ -40,12 +40,12 @@ class MemoryUsageDataModelUtil(DataModelUtil):
|
|||
:param userspace: the userspace 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:
|
||||
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_kernel = kernel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue