Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Max Kellermann <max+openembedded@blarg.de>
To: openembedded-core@lists.openembedded.org
Cc: Max Kellermann <max.kellermann@gmail.com>
Subject: [PATCH 2/3] useradd-staticids: print exception after parse_args() error
Date: Thu,  7 Mar 2019 14:04:00 +0100	[thread overview]
Message-ID: <20190307130401.15700-2-max+openembedded@blarg.de> (raw)
In-Reply-To: <20190307130401.15700-1-max+openembedded@blarg.de>

From: Max Kellermann <max.kellermann@gmail.com>

Without this, the user has no idea what went wrong.

Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
---
 meta/classes/useradd-staticids.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index 70d59e5573..3a1b5f1320 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -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:
-- 
2.20.1



  reply	other threads:[~2019-03-07 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 13:03 [PATCH 1/3] libsndfile1: make sqlite and FLAC/Vorbis optional Max Kellermann
2019-03-07 13:04 ` Max Kellermann [this message]
2019-03-07 13:04 ` [PATCH 3/3] initrdscripts: merge multiple "mkdir" calls Max Kellermann
2019-03-07 13:12 ` [PATCH 1/3] libsndfile1: make sqlite and FLAC/Vorbis optional Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307130401.15700-2-max+openembedded@blarg.de \
    --to=max+openembedded@blarg.de \
    --cc=max.kellermann@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox