Allow subclasses to implement mode-methods.

This commit is contained in:
Jeffrey Townsend
2016-11-29 17:39:13 +00:00
parent 69b9ae8efb
commit f64d0ff258

View File

@@ -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