summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 13:55:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 14:06:50 +0100
commitdb8217f6b89be11a17e9f3cba7d98be64d8aded1 (patch)
tree8bd8c54c90035d3fbe4d7e9a85fe701b535d7a4a /meta/classes/useradd.bbclass
parente0bd393be8e6419cd19dd860c75de75ea73c7509 (diff)
downloadpoky-db8217f6b89be11a17e9f3cba7d98be64d8aded1.tar.gz
classes: Use modern exception raising syntax
Modern expection rasing syntax is function call format, convert to this to keep python 3 happy and model correct coding style in the core. (From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd.bbclass')
-rw-r--r--meta/classes/useradd.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 0a4febadc8..52c0ba4ec1 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -157,11 +157,11 @@ def update_useradd_after_parse(d):
157 useradd_packages = d.getVar('USERADD_PACKAGES', True) 157 useradd_packages = d.getVar('USERADD_PACKAGES', True)
158 158
159 if not useradd_packages: 159 if not useradd_packages:
160 raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE') 160 raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE'))
161 161
162 for pkg in useradd_packages.split(): 162 for pkg in useradd_packages.split():
163 if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True): 163 if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True):
164 raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM for package %s" % (d.getVar('FILE'), pkg) 164 raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM for package %s" % (d.getVar('FILE'), pkg))
165 165
166python __anonymous() { 166python __anonymous() {
167 update_useradd_after_parse(d) 167 update_useradd_after_parse(d)