mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-22 04:00: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):
|
||||
log.info("Getting dangling volumes")
|
||||
volumes = client.volumes({'dangling': True})['Volumes']
|
||||
if volumes == None:
|
||||
volumes = []
|
||||
volumes = client.volumes({'dangling': True})['Volumes'] or []
|
||||
log.info("Found %s dangling volumes", len(volumes))
|
||||
return volumes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user