From f484d1c2a8a3fafdee28bf346b350084be710b91 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 2 Dec 2008 23:43:51 +0100 Subject: [PATCH] Fix formatting of PGP fingerprints - the double space was always one element too early. --- debian/changelog | 4 +++- userdir_ldap.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8d24a2e..306038a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ userdir-ldap (0.3.XX) unstable; urgency=low * Properly show shadowlastchange and mail disabled message when locking an account, but not disabling email. It was written to ldap correctly, but we updated the data to display wrongly. + * Fix formatting of PGP fingerprints - the double space was always + one element too early. - -- Peter Palfrader Mon, 24 Nov 2008 11:24:16 +0100 + -- Peter Palfrader Tue, 02 Dec 2008 23:43:27 +0100 userdir-ldap (0.3.52) unstable; urgency=low diff --git a/userdir_ldap.py b/userdir_ldap.py index 3a43f4f..babfce0 100644 --- a/userdir_ldap.py +++ b/userdir_ldap.py @@ -321,7 +321,7 @@ def FormatPGPKey(Str): if (len(Str) == 32): I = 0; while (I < len(Str)): - if I+2 == 32/2: + if I == 32/2: Res = "%s %s%s "%(Res,Str[I],Str[I+1]); else: Res = "%s%s%s "%(Res,Str[I],Str[I+1]); @@ -330,7 +330,7 @@ def FormatPGPKey(Str): # OpenPGP Print I = 0; while (I < len(Str)): - if I+4 == 40/2: + if I == 40/2: Res = "%s %s%s%s%s "%(Res,Str[I],Str[I+1],Str[I+2],Str[I+3]); else: Res = "%s%s%s%s%s "%(Res,Str[I],Str[I+1],Str[I+2],Str[I+3]); -- 2.20.1