mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-22 12:10:40 +00:00
Be more idiomatic in testing for volumes
This commit is contained in:
parent
e17dd441be
commit
9aaa244b68
@ -76,9 +76,7 @@ def get_all_images(client):
|
|||||||
|
|
||||||
def get_dangling_volumes(client):
|
def get_dangling_volumes(client):
|
||||||
log.info("Getting dangling volumes")
|
log.info("Getting dangling volumes")
|
||||||
volumes = client.volumes({'dangling': True})['Volumes']
|
volumes = client.volumes({'dangling': True})['Volumes'] or []
|
||||||
if volumes == None:
|
|
||||||
volumes = []
|
|
||||||
log.info("Found %s dangling volumes", len(volumes))
|
log.info("Found %s dangling volumes", len(volumes))
|
||||||
return volumes
|
return volumes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user