diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-04-24 10:01:01 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-24 04:34:44 +0200 |
commit | 0d5d45c2dffbe6f630ecc8d6cab8501dc3e07214 (patch) | |
tree | 74e88d406734badb13153ff1e236a6807797e60b /source4/scripting/python | |
parent | adbace20a24b6ae4fbd6d17b7153833f4ac8c88d (diff) | |
download | samba-0d5d45c2dffbe6f630ecc8d6cab8501dc3e07214.tar.gz samba-0d5d45c2dffbe6f630ecc8d6cab8501dc3e07214.tar.bz2 samba-0d5d45c2dffbe6f630ecc8d6cab8501dc3e07214.zip |
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 <abartlet@samba.org>
Autobuild-Date: Tue Apr 24 04:34:44 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/upgrade.py | 12 |
1 files changed, 6 insertions, 6 deletions
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", |