Changes in list function

This commit is contained in:
rune 2023-04-19 08:49:22 +02:00
parent 15e8f8ac90
commit 12215074d6

View File

@ -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)))