From 584700e6cd7a1e49a3b8f9fffa052985f8ffbda3 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 19 May 2009 09:04:21 +0000 Subject: [PATCH] fix --- plc-orphan-accounts.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plc-orphan-accounts.py b/plc-orphan-accounts.py index 2c8189b..f409d86 100755 --- a/plc-orphan-accounts.py +++ b/plc-orphan-accounts.py @@ -9,7 +9,7 @@ def get_orphans (): return [p for p in GetPersons({'peer_id':None,'-SORT':'date_created'}) if not p['site_ids'] ] def list_person (margin,p): - print margin,'%6d'%p[person_id], time.asctime(time.gmtime(p['date_created'])), + print margin,'%6d'%p['person_id'], time.asctime(time.gmtime(p['date_created'])), if not p['peer_id']: print 'LOCAL', else: print 'pr=',p['peer_id'], print p['email'] @@ -20,12 +20,13 @@ def get_related(email): def main (): orphans = get_orphans() - print 'Found',len(orphans),'orphan accounts' + print GetPeerName(),' --- %d --- '%len(orphans),'orphan accounts' + print '---' index=1 for p in orphans: list_person ("%3d"%index,p) for related in get_related(p['email']): - list_person("---",related) + list_person("dup",related) index+=1 if __name__ == '__main__': -- 2.47.0