From b15ef6d854f8c39f8424c2ee524f1aca6bf2906c Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 18 Sep 2009 17:33:24 +0200 Subject: s4:pwsettings - Simplify the error handling a bit --- source4/setup/pwsettings | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source4/setup') diff --git a/source4/setup/pwsettings b/source4/setup/pwsettings index cd9c07dfb5..fccd73fc41 100755 --- a/source4/setup/pwsettings +++ b/source4/setup/pwsettings @@ -79,13 +79,10 @@ try: min_pwd_age = int(abs(int(res[0]["minPwdAge"][0])) / (1e7 * 60 * 60 * 24)) max_pwd_age = int(abs(int(res[0]["maxPwdAge"][0])) / (1e7 * 60 * 60 * 24)) except: + print "ERROR: Could not retrieve password properties!" if args[0] == "show": - print "ERROR: Password informations missing in your AD domain object!" print "So no settings can be displayed!" - sys.exit(1) - else: - print "ERROR: Could not retrieve password properties (used for password complexity setting)" - sys.exit(1) + sys.exit(1) if args[0] == "show": message("Password informations for domain '" + domain_dn + "'") -- cgit