Handle if "TRUNK_SKELETON" is not loaded
If "TRUNK_SKELETON" has not been initialized, the "unregister" method should finish gracefully. This issue is happening in fullstalk tests, where the trunk initialization is not executed if "trunk" is not in the service plugins. Closes-Bug: #2000314 Change-Id: Idef5fd8feaf1af309862d6cb3e06da3734fb6c19
This commit is contained in:
@@ -105,4 +105,7 @@ def init_handler(resource, event, trigger, payload=None):
|
||||
def unregister():
|
||||
"""Cleanup fanout queues"""
|
||||
global TRUNK_SKELETON
|
||||
TRUNK_SKELETON.unregister()
|
||||
try:
|
||||
TRUNK_SKELETON.unregister()
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user