mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 09:17:08 +00:00
Allow subclasses to implement mode-methods.
This commit is contained in:
@@ -14,6 +14,9 @@ class Plugin(object):
|
||||
|
||||
def run(self, mode):
|
||||
|
||||
if hasattr(self, mode):
|
||||
return getattr(self, mode)()
|
||||
|
||||
if mode == self.PLUGIN_PREINSTALL:
|
||||
self.log.warn("pre-install plugin not implemented")
|
||||
return 0
|
||||
@@ -27,3 +30,4 @@ class Plugin(object):
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user