summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/common/utils.py
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-09-19 14:23:44 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-19 14:23:44 +0000
commitbe620c74d492cb2e4b9ad3055832e36849a3ac6b (patch)
tree5d919e23cf404d4aa8d999dd7dfc6f7b30d2d48e /tosca2heat/heat-translator/translator/common/utils.py
parent86b894e80fcb29f0354109730ee37bff20b1a89b (diff)
parentf977b94e012828cd2a905b9b841aff33c4b732f8 (diff)
Merge "Update the upstream of tosco-parser and heat-translator to stable release 0.6/0.5"
Diffstat (limited to 'tosca2heat/heat-translator/translator/common/utils.py')
-rw-r--r--tosca2heat/heat-translator/translator/common/utils.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tosca2heat/heat-translator/translator/common/utils.py b/tosca2heat/heat-translator/translator/common/utils.py
index 8e4b690..459b5ee 100644
--- a/tosca2heat/heat-translator/translator/common/utils.py
+++ b/tosca2heat/heat-translator/translator/common/utils.py
@@ -18,7 +18,6 @@ import numbers
import os
import re
import requests
-import six
from six.moves.urllib.parse import urlparse
import yaml
@@ -263,17 +262,12 @@ class UrlUtils(object):
def str_to_num(value):
"""Convert a string representation of a number into a numeric type."""
- if isinstance(value, numbers.Number) \
- or isinstance(value, six.integer_types) \
- or isinstance(value, float):
+ if isinstance(value, numbers.Number):
return value
try:
return int(value)
except ValueError:
- try:
- return float(value)
- except ValueError:
- return None
+ return float(value)
def check_for_env_variables():