From ac11b616dd67847be4f54f6fc08b64bacc0802f4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 20 Apr 2010 20:30:41 +1000 Subject: s4-net: don't show a full python exception when you can't open sam.ldb --- source4/scripting/python/samba/netcmd/newuser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/scripting/python/samba/netcmd/newuser.py b/source4/scripting/python/samba/netcmd/newuser.py index f3babfe780..64b6d1715c 100644 --- a/source4/scripting/python/samba/netcmd/newuser.py +++ b/source4/scripting/python/samba/netcmd/newuser.py @@ -60,9 +60,9 @@ class cmd_newuser(Command): lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) - samdb = SamDB(url=H, session_info=system_session(), credentials=creds, - lp=lp) try: + samdb = SamDB(url=H, session_info=system_session(), credentials=creds, + lp=lp) samdb.newuser(username, unixname, password, force_password_change_at_next_login_req=must_change_at_next_login) except ldb.LdbError, (num, msg): -- cgit