Return an empty array when there is no data for json output

This commit is contained in:
Daniel Carrillo 2021-02-19 17:46:04 +01:00
parent ef31af865a
commit 204ec8f9ff
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 2 additions and 3 deletions

View File

@ -1,2 +1,2 @@
__version__ = '1.0.3' __version__ = '1.0.4'
__description__ = 'Look up canonical information for AWS IP addresses and networks' __description__ = 'Look up canonical information for AWS IP addresses and networks'

View File

@ -127,8 +127,7 @@ class DigAWSPrettyPrinter:
item_dict.update({'network_border_group': prefix['network_border_group']}) item_dict.update({'network_border_group': prefix['network_border_group']})
data.append(item_dict) data.append(item_dict)
if data: print(json.dumps(data, indent=2))
print(json.dumps(data, indent=2))
class DigAWS(): class DigAWS():