mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-25 13:40:40 +00:00
Merge pull request #45 from samiam/fix_empty_volumes
Correctly handle empty dangling volumes
This commit is contained in:
commit
49e1bdfe3d
@ -1,5 +1,6 @@
|
||||
repos:
|
||||
- repo: git://github.com/pre-commit/pre-commit-hooks
|
||||
sha: 'v0.4.2'
|
||||
rev: v1.2.3
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-docstring-first
|
||||
|
12
.travis.yml
12
.travis.yml
@ -1,8 +1,12 @@
|
||||
language: python
|
||||
env:
|
||||
- TOXENV=py27
|
||||
- TOXENV=py33
|
||||
- TOXENV=py34
|
||||
matrix:
|
||||
include:
|
||||
- python: 2.7
|
||||
env: TOXENV=py27
|
||||
- python: 3.5
|
||||
env: TOXENV=py35
|
||||
- python: 3.6
|
||||
env: TOXENV=py36
|
||||
install:
|
||||
- pip install tox
|
||||
script:
|
||||
|
@ -76,7 +76,7 @@ def get_all_images(client):
|
||||
|
||||
def get_dangling_volumes(client):
|
||||
log.info("Getting dangling volumes")
|
||||
volumes = client.volumes({'dangling': True})['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