Merge pull request #1965 from andrewmccall/master

Added double to to_str/from_str, returned by emr create_cluster
This commit is contained in:
Steve Pulec 2018-12-28 21:05:07 -05:00 committed by GitHub
commit 6523a14611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -718,6 +718,8 @@ def to_str(value, spec):
return str(value)
elif vtype == 'float':
return str(value)
elif vtype == 'double':
return str(value)
elif vtype == 'timestamp':
return datetime.datetime.utcfromtimestamp(
value).replace(tzinfo=pytz.utc).isoformat()
@ -737,6 +739,8 @@ def from_str(value, spec):
return int(value)
elif vtype == 'float':
return float(value)
elif vtype == 'double':
return float(value)
elif vtype == 'timestamp':
return value
elif vtype == 'string':