1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-13 08:59:08 +03:00

s4-net: don't show a full python exception when you can't open sam.ldb

This commit is contained in:
Andrew Tridgell
2010-04-20 20:30:41 +10:00
parent 9b66b7abcc
commit ac11b616dd

View File

@ -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):