[f23-branch 1/1] Ignore requests to create existing groups (#1261002)
dashea
installerbot-noreply at redhat.com
Wed Sep 16 18:36:26 UTC 2015
From: David Shea <dshea at redhat.com>
Part of the fallout from removing libuser is that some errors that were
lost somewhere across the fork and chroot are now actually errors. One
of those errors is that you are not allowed to request that a group be
created if that group already exists, so it is written. Unfortunately
the current code to add users to existing groups depends on requests to
create existing groups not crashing, so go back to ignoring the error as
a quick fix for 23.
---
pyanaconda/users.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
index b7e9273..7055b95 100644
--- a/pyanaconda/users.py
+++ b/pyanaconda/users.py
@@ -208,7 +208,8 @@ def createGroup(self, group_name, **kwargs):
root = kwargs.get("root", iutil.getSysroot())
if self._groupExists(group_name, root):
- raise ValueError("Group %s already exists" % group_name)
+ # If the group already exists, skip it
+ return
args = ["-R", root]
if kwargs.get("gid") is not None:
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/68b4b5249e5c28d2e602f31aac75bd497b727dcb
More information about the anaconda-patches
mailing list