]> code.ossystems Code Review - openembedded-core.git/commitdiff
useradd-staticids: print exception after parse_args() error
authorMax Kellermann <max.kellermann@gmail.com>
Thu, 7 Mar 2019 13:04:00 +0000 (14:04 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 3 May 2019 16:25:25 +0000 (17:25 +0100)
Without this, the user has no idea what went wrong.

Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd-staticids.bbclass

index 70d59e55737462a51b38ac44f2b8bfe145136e31..3a1b5f132058175193eed44edb940a68767b7662 100644 (file)
@@ -76,8 +76,8 @@ def update_useradd_static_config(d):
         for param in oe.useradd.split_commands(params):
             try:
                 uaargs = parser.parse_args(oe.useradd.split_args(param))
-            except:
-                bb.fatal("%s: Unable to parse arguments for USERADD_PARAM_%s: '%s'" % (d.getVar('PN'), pkg, param))
+            except Exception as e:
+                bb.fatal("%s: Unable to parse arguments for USERADD_PARAM_%s '%s': %s" % (d.getVar('PN'), pkg, param, e))
 
             # Read all passwd files specified in USERADD_UID_TABLES or files/passwd
             # Use the standard passwd layout:
@@ -197,8 +197,8 @@ def update_useradd_static_config(d):
             try:
                 # If we're processing multiple lines, we could have left over values here...
                 gaargs = parser.parse_args(oe.useradd.split_args(param))
-            except:
-                bb.fatal("%s: Unable to parse arguments for GROUPADD_PARAM_%s: '%s'" % (d.getVar('PN'), pkg, param))
+            except Exception as e:
+                bb.fatal("%s: Unable to parse arguments for GROUPADD_PARAM_%s '%s': %s" % (d.getVar('PN'), pkg, param, e))
 
             # Read all group files specified in USERADD_GID_TABLES or files/group
             # Use the standard group layout: