From 12215074d6e57bedbee2f00b622b6364e6ad0a5e Mon Sep 17 00:00:00 2001 From: rune Date: Wed, 19 Apr 2023 08:49:22 +0200 Subject: [PATCH] Changes in list function --- malias.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/malias.py b/malias.py index 6f8bd07..55992cb 100644 --- a/malias.py +++ b/malias.py @@ -244,6 +244,7 @@ def list_alias(): remote = current.read().decode('utf-8') remoteData = json.loads(remote) i = 0 + l = 0 print('\n[b]malias[/b] - All aliases on %s ([b]*[/b] also in local db)' %(mail_server)) print('==================================================================') for search in remoteData: @@ -253,10 +254,11 @@ def list_alias(): count = cursor.fetchone()[0] if count >= 1: print(the_alias + '\tgoes to\t\t' + the_goto + '\t[b]*[/b]') + l=l+1 else: print(the_alias + '\tgoes to\t\t' + the_goto) i=i+1 - print('\n\nTotal number of aliases %s. Fetched from instance [b]%s[/b]' %(str(i),mail_server)) + print('\n\nTotal number of aliases %s on instance [b]%s[/b] and %s on [b]local DB[/b].' %(str(i),mail_server,str(l)))