From 20c785b63a614652da4fd8c69cd2fea9701458fc Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Fri, 5 Jun 2015 09:44:47 +0200 Subject: [PATCH] python3 compatibility: use isinstance instead of type() --- helpers/aws.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helpers/aws.py b/helpers/aws.py index 3b72c492..916b62c1 100644 --- a/helpers/aws.py +++ b/helpers/aws.py @@ -2,7 +2,6 @@ import logging import re import requests from requests.exceptions import RequestException -import types import boto.ec2 logger = logging.getLogger(__name__) @@ -15,7 +14,7 @@ class AWSConnection: if 'cluster_name' in config: self.cluster_name = config.get('cluster_name') - elif 'etcd' in config and type(config['etcd']) == types.DictType: + elif 'etcd' in config and isinstance(config['etcd'], dict): self.cluster_name = config['etcd'].get('scope', 'unknown') else: self.cluster_name = 'unknown'