Skip to content

Commit a8a7156

Browse files
committed
Refactor: remove unnecessary '_meta' instance var from 'Callback' class
Signed-off-by: Simone Tollardo <[email protected]>
1 parent 8ce82d2 commit a8a7156

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernelci/runtime/lava.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ class Callback:
8686
def __init__(self, data):
8787
"""This class can be used to parse LAVA callback data"""
8888
self._data = data
89-
self._meta = None
9089

9190
def get_data(self):
9291
"""Get the raw callback data"""
@@ -102,9 +101,7 @@ def get_job_definition(self, key):
102101

103102
def get_meta(self, key):
104103
"""Get a metadata value from the job definition"""
105-
if self._meta is None:
106-
self._meta = yaml.safe_load(self._data['definition'])['metadata']
107-
return self._meta.get(key)
104+
return self.get_job_definition('metadata').get(key)
108105

109106
def get_job_status(self):
110107
"""Get the job status"""

0 commit comments

Comments
 (0)