From 2d4fc2cd512758b68500bc0327c44be0ee1f7fb3 Mon Sep 17 00:00:00 2001 From: Alexey Rokhin Date: Wed, 17 May 2017 15:10:44 +0300 Subject: [PATCH] Fix cpu option checking. Signed-off-by: Alexey Rokhin --- compose/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/service.py b/compose/service.py index dc653b165..3956a4782 100644 --- a/compose/service.py +++ b/compose/service.py @@ -802,7 +802,7 @@ class Service(object): options['init'] = True nano_cpus = None - if options.has_key('cpus'): + if 'cpus' in options: nano_cpus = int(options.get('cpus') * 1000000000) return self.client.create_host_config(