summaryrefslogtreecommitdiffstats
path: root/meta/recipes.txt
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2015-12-19 00:53:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-18 11:47:06 +0000
commitb18e40ce2f5859865d26a4010d78e65f6f2972fc (patch)
tree0e5182592cf4ca8bfbabb6e042ac3acf28d60e64 /meta/recipes.txt
parentb689aa0df3c2cd36d3b54dd84ec3e264e8fd85ff (diff)
downloadpoky-b18e40ce2f5859865d26a4010d78e65f6f2972fc.tar.gz
useradd-staticids.bbclass: Simplify some logic
The [<on_true>, <on_false>][not <condition>] construct may solve the problem of implementing a conditional operator, but it is not very readable. At least I find this: uaargs.groupid = field[3] or uaargs.gid or uaargs.groupname a lot more readable than this: uaargs.groupid = [uaargs.gid, uaargs.groupname][not uaargs.gid] uaargs.groupid = [field[3], uaargs.groupid][not field[3]] Also, the official conditional operator since Python 2.5 (<on_true> if <condition> else <on_false>) does not evaluate both <on_false> and <on_true> as [<on_true>, <on_false>][not <condition>] does. (From OE-Core rev: 274d38a6e2183ec88335a08b963f26c34b328558) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes.txt')
0 files changed, 0 insertions, 0 deletions