summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/common/utils.py
diff options
context:
space:
mode:
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():