From 0d5d45c2dffbe6f630ecc8d6cab8501dc3e07214 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 24 Apr 2012 10:01:01 +1000 Subject: s4-s3upgrade: print the error message from passdb.error exceptions This gives more information on why a group membership lookup failed. Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Tue Apr 24 04:34:44 CEST 2012 on sn-devel-104 --- source4/scripting/python/samba/upgrade.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py index 8b8d05d42e..216ad41047 100644 --- a/source4/scripting/python/samba/upgrade.py +++ b/source4/scripting/python/samba/upgrade.py @@ -536,16 +536,16 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, useeadb=Fa if group.sid_name_use == lsa.SID_NAME_ALIAS: try: members = s3db.enum_aliasmem(group.sid) - except passdb.error: + except passdb.error, e: logger.warn("Ignoring group '%s' %s listed but then not found: %s", - group.nt_name, group.sid, passdb.error) + group.nt_name, group.sid, e) continue elif group.sid_name_use == lsa.SID_NAME_DOM_GRP: try: members = s3db.enum_group_members(group.sid) - except passdb.error: + except passdb.error, e: logger.warn("Ignoring group '%s' %s listed but then not found: %s", - group.nt_name, group.sid, passdb.error) + group.nt_name, group.sid, e) continue groupmembers[group.nt_name] = members elif group.sid_name_use == lsa.SID_NAME_WKN_GRP: @@ -557,9 +557,9 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, useeadb=Fa # A number of buggy databases mix up well known groups and aliases. try: members = s3db.enum_aliasmem(group.sid) - except passdb.error: + except passdb.error, e: logger.warn("Ignoring group '%s' %s listed but then not found: %s", - group.nt_name, group.sid, passdb.error) + group.nt_name, group.sid, e) continue else: logger.warn("Ignoring group '%s' with sid_name_use=%d", -- cgit