summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-15 19:50:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 23:18:17 +0000
commit59b72c0b260001b98eca87f3e6c0dfccef38182c (patch)
treedf11d049e83d9526a2888819fced9f27577a7f93 /scripts
parent455ce228df18eb67ba08b7433eea334df6994391 (diff)
downloadpoky-59b72c0b260001b98eca87f3e6c0dfccef38182c.tar.gz
wic: throw exception if required API is not implemented
Throw WicError if do_create method of imager plugin is not implemented. (From OE-Core rev: 87031c933047a37ddc26be3d04ea17b6e60ea10a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/pluginbase.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index 07ccf622f4..743170a5fa 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -21,6 +21,8 @@ import logging
21 21
22from collections import defaultdict 22from collections import defaultdict
23 23
24from wic import WicError
25
24logger = logging.getLogger('wic') 26logger = logging.getLogger('wic')
25 27
26class PluginMeta(type): 28class PluginMeta(type):
@@ -35,6 +37,10 @@ class PluginMeta(type):
35class ImagerPlugin(metaclass=PluginMeta): 37class ImagerPlugin(metaclass=PluginMeta):
36 wic_plugin_type = "imager" 38 wic_plugin_type = "imager"
37 39
40 def do_create(self):
41 raise WicError("Method %s.do_create is not implemented" %
42 self.__class__.__name__)
43
38class SourcePlugin(metaclass=PluginMeta): 44class SourcePlugin(metaclass=PluginMeta):
39 wic_plugin_type = "source" 45 wic_plugin_type = "source"
40 """ 46 """