s4-s3-upgrade: Allow import (just without a uid mapping) where getpwnam fails
authorAndrew Bartlett <abartlet@samba.org>
Mon, 10 Oct 2011 02:09:30 +0000 (13:09 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 11 Oct 2011 02:41:36 +0000 (13:41 +1100)
This allows the tests to pass on systems without a jelmer user :-)

Andrew Bartlett

source4/scripting/python/samba/upgrade.py

index 60cff51198453cd93047974e1c2004dcb420e601..53ae93afcfa7ed723078c8a3ef007953c661d6c1 100644 (file)
@@ -591,7 +591,7 @@ Please fix this account before attempting to upgrade again
         except passdb.error:
             try:
                 uids[username] = pwd.getpwnam(username).pw_uid
-            except passdb.error:
+            except KeyError:
                 pass
 
         if not admin_user and username.lower() == 'root':