diff options
Diffstat (limited to 'source4/scripting/python/samba/netcmd/setpassword.py')
-rw-r--r-- | source4/scripting/python/samba/netcmd/setpassword.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/setpassword.py b/source4/scripting/python/samba/netcmd/setpassword.py index 098b3cb9b8..d51e8ea42a 100644 --- a/source4/scripting/python/samba/netcmd/setpassword.py +++ b/source4/scripting/python/samba/netcmd/setpassword.py @@ -22,7 +22,6 @@ import samba.getopt as options from samba.netcmd import Command, CommandError, Option -import sys from getpass import getpass from samba.auth import system_session from samba.samdb import SamDB @@ -73,6 +72,5 @@ class cmd_setpassword(Command): force_change_at_next_login=must_change_at_next_login, username=username) except: - print('Failed to set password for user "%s"' % username) - sys.exit(1) - + raise CommandError('Failed to set password for user "%s"' % + username) |