From f2019e7042d12088bce45f8c2ad52ec600a4076d Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Wed, 16 Aug 2017 13:22:15 -0300 Subject: [PATCH] 12055: Code simplification. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- services/nodemanager/arvnodeman/computenode/driver/ec2.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/nodemanager/arvnodeman/computenode/driver/ec2.py b/services/nodemanager/arvnodeman/computenode/driver/ec2.py index 846aa6c211..d204d7a8c0 100644 --- a/services/nodemanager/arvnodeman/computenode/driver/ec2.py +++ b/services/nodemanager/arvnodeman/computenode/driver/ec2.py @@ -53,8 +53,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver): for key, value in list_kwargs.iteritems() if key.startswith('tag:')} # Tags are assigned at instance creation time - if not 'ex_metadata' in create_kwargs: - create_kwargs['ex_metadata'] = {} + create_kwargs.setdefault('ex_metadata', {}) create_kwargs['ex_metadata'].update(self.tags) super(ComputeNodeDriver, self).__init__( auth_kwargs, {'ex_filters': list_kwargs}, create_kwargs, -- 2.30.2