Automatically determine the Docker API version to use instead of assuming the latest.

This commit is contained in:
John Schrantz 2015-09-02 12:58:04 -05:00
parent 4c008ed05a
commit 773f97d450
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)