From: Tim Beale Date: Wed, 15 Aug 2018 05:21:43 +0000 (+1200) Subject: python/pso tests: use string .format() style rather than C-style %s/%d. X-Git-Tag: tdb-1.3.17~2137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=078bd79501d0d4f3c60db7fcab7999eabdcf4cd6;p=thirdparty%2Fsamba.git python/pso tests: use string .format() style rather than C-style %s/%d. Signed-off-by: Tim Beale Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/tests/pso.py b/python/samba/tests/pso.py index 8ca86be5e80..76c8d46e90b 100644 --- a/python/samba/tests/pso.py +++ b/python/samba/tests/pso.py @@ -226,21 +226,21 @@ class PasswordSettings: # all the following fields are mandatory for the PSO object ldif = """ -dn: %s +dn: {} objectClass: msDS-PasswordSettings -msDS-PasswordSettingsPrecedence: %u -msDS-PasswordReversibleEncryptionEnabled: %s -msDS-PasswordHistoryLength: %u -msDS-PasswordComplexityEnabled: %s -msDS-MinimumPasswordLength: %u -msDS-MinimumPasswordAge: %d -msDS-MaximumPasswordAge: %d -msDS-LockoutThreshold: %u -msDS-LockoutObservationWindow: %d -msDS-LockoutDuration: %d -""" % (self.dn, self.precedence, plaintext_str, self.history_len, - complexity_str, self.password_len, min_age, max_age, - self.lockout_attempts, lockout_window, lockout_duration) +msDS-PasswordSettingsPrecedence: {} +msDS-PasswordReversibleEncryptionEnabled: {} +msDS-PasswordHistoryLength: {} +msDS-PasswordComplexityEnabled: {} +msDS-MinimumPasswordLength: {} +msDS-MinimumPasswordAge: {} +msDS-MaximumPasswordAge: {} +msDS-LockoutThreshold: {} +msDS-LockoutObservationWindow: {} +msDS-LockoutDuration: {} +""".format(self.dn, self.precedence, plaintext_str, self.history_len, + complexity_str, self.password_len, min_age, max_age, + self.lockout_attempts, lockout_window, lockout_duration) return ldif