Don't show tag line in info if no tags

This commit is contained in:
Joshua Boniface 2021-07-14 00:59:24 -04:00
parent 75fb60b1b4
commit 6d4c26c8d8
1 changed files with 26 additions and 18 deletions

View File

@ -1382,6 +1382,7 @@ def format_info(config, domain_information, long_output):
if _tags_protected_length > tags_protected_length:
tags_protected_length = _tags_protected_length
if len(domain_information['tags']) > 0:
ainformation.append('')
ainformation.append('{purple}Tags:{end} {bold}{tags_name: <{tags_name_length}} {tags_type: <{tags_type_length}} {tags_protected: <{tags_protected_length}}{end}'.format(
purple=ansiprint.purple(),
@ -1404,6 +1405,13 @@ def format_info(config, domain_information, long_output):
tags_type=tag['type'],
tags_protected=str(tag['protected'])
))
else:
ainformation.append('')
ainformation.append('{purple}Tags:{end} N/A'.format(
purple=ansiprint.purple(),
bold=ansiprint.bold(),
end=ansiprint.end(),
))
# Network list
net_list = []