1
0
Fork 0

Merge pull request #500 from CZerta/rhbz2080227_fix

Fixing no _evlist attribute when run without daemon
This commit is contained in:
Jaroslav Škarvada 2023-02-09 17:03:18 +01:00 committed by GitHub
commit b4f21db0e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -446,6 +446,7 @@ class SchedulerPlugin(base.Plugin):
command_name = "scheduler")
self._irq_storage_key = self._storage_key(
command_name = "irq")
self._evlist = None
try:
self._scheduler_utils = SchedulerUtils()
except AttributeError:
@ -526,8 +527,9 @@ class SchedulerPlugin(base.Plugin):
instance._runtime_tuning = False
def _instance_cleanup(self, instance):
for fd in instance._evlist.get_pollfd():
os.close(fd.name)
if self._evlist:
for fd in instance._evlist.get_pollfd():
os.close(fd.name)
@classmethod
def _get_config_options(cls):