summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-20 20:30:41 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-20 20:59:24 +1000
commitac11b616dd67847be4f54f6fc08b64bacc0802f4 (patch)
tree9b2869c139a80f2f92a9320fcb44eca358d48ebf /source4
parent9b66b7abcc828d864d2049133f2f0a5b41994ddd (diff)
downloadsamba-ac11b616dd67847be4f54f6fc08b64bacc0802f4.tar.gz
samba-ac11b616dd67847be4f54f6fc08b64bacc0802f4.tar.bz2
samba-ac11b616dd67847be4f54f6fc08b64bacc0802f4.zip
s4-net: don't show a full python exception when you can't open sam.ldb
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/newuser.py4
1 files 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):