[oe-commits] [openembedded-core] 19/63: wic: throw exception if required API is not implemented
git at git.openembedded.org
git at git.openembedded.org
Sat Mar 4 10:46:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 87031c933047a37ddc26be3d04ea17b6e60ea10a
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed Feb 15 19:50:45 2017 +0200
wic: throw exception if required API is not implemented
Throw WicError if do_create method of imager plugin is
not implemented.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
scripts/lib/wic/pluginbase.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index 07ccf62..743170a 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -21,6 +21,8 @@ import logging
from collections import defaultdict
+from wic import WicError
+
logger = logging.getLogger('wic')
class PluginMeta(type):
@@ -35,6 +37,10 @@ class PluginMeta(type):
class ImagerPlugin(metaclass=PluginMeta):
wic_plugin_type = "imager"
+ def do_create(self):
+ raise WicError("Method %s.do_create is not implemented" %
+ self.__class__.__name__)
+
class SourcePlugin(metaclass=PluginMeta):
wic_plugin_type = "source"
"""
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list