mirror of
https://github.com/dcarrillo/digaws.git
synced 2024-12-22 22:08:00 +00:00
Merge pull request #6 from dcarrillo/1.0.4
Return an empty array when there is no data for json output
This commit is contained in:
commit
a3517a25ab
@ -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'
|
||||||
|
@ -127,7 +127,6 @@ 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))
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,4 +84,5 @@ def test_get_aws_ip_ranges_invalid_status(mocker, fs, create_cache_dir) -> None:
|
|||||||
|
|
||||||
with pytest.raises(digaws.UnexpectedRequestException) as e:
|
with pytest.raises(digaws.UnexpectedRequestException) as e:
|
||||||
digaws.get_aws_ip_ranges()
|
digaws.get_aws_ip_ranges()
|
||||||
assert e.startswith('Unexpected response from')
|
|
||||||
|
assert e.match('^Unexpected response from')
|
||||||
|
Loading…
Reference in New Issue
Block a user