Merge pull request #12 from jschrantz/autoversion

Automatically determine the Docker API version to use
This commit is contained in:
Daniel Nephin 2015-09-23 10:37:41 -04:00
commit 448bec4854
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ def main():
stream=sys.stdout)
opts = get_opts()
client = docker.Client(timeout=opts.timeout)
client = docker.Client(version='auto', timeout=opts.timeout)
matcher = build_container_matcher(opts.prefix)
stop_containers(client, opts.max_run_time, matcher, opts.dry_run)

View File

@ -170,7 +170,7 @@ def main():
stream=sys.stdout)
args = get_args()
client = docker.Client(timeout=args.timeout)
client = docker.Client(version='auto', timeout=args.timeout)
if args.max_container_age:
cleanup_containers(client, args.max_container_age, args.dry_run)