diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-20 20:30:41 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-20 20:59:24 +1000 |
commit | ac11b616dd67847be4f54f6fc08b64bacc0802f4 (patch) | |
tree | 9b2869c139a80f2f92a9320fcb44eca358d48ebf /source4/scripting | |
parent | 9b66b7abcc828d864d2049133f2f0a5b41994ddd (diff) | |
download | samba-ac11b616dd67847be4f54f6fc08b64bacc0802f4.tar.gz samba-ac11b616dd67847be4f54f6fc08b64bacc0802f4.tar.xz samba-ac11b616dd67847be4f54f6fc08b64bacc0802f4.zip |
s4-net: don't show a full python exception when you can't open sam.ldb
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/netcmd/newuser.py | 4 |
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 f3babfe780c..64b6d1715ce 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): |