Fix TypeError when calling emr:RunJobFlow with AutoTerminationPolicy (#5285)
This commit is contained in:
parent
01d0141da8
commit
fff61af6fc
@ -916,6 +916,8 @@ def to_str(value, spec):
|
|||||||
vtype = spec["type"]
|
vtype = spec["type"]
|
||||||
if vtype == "boolean":
|
if vtype == "boolean":
|
||||||
return "true" if value else "false"
|
return "true" if value else "false"
|
||||||
|
elif vtype == "long":
|
||||||
|
return int(value)
|
||||||
elif vtype == "integer":
|
elif vtype == "integer":
|
||||||
return str(value)
|
return str(value)
|
||||||
elif vtype == "float":
|
elif vtype == "float":
|
||||||
|
@ -117,6 +117,7 @@ def test_describe_cluster():
|
|||||||
args["Tags"] = [{"Key": "tag1", "Value": "val1"}, {"Key": "tag2", "Value": "val2"}]
|
args["Tags"] = [{"Key": "tag1", "Value": "val1"}, {"Key": "tag2", "Value": "val2"}]
|
||||||
args["SecurityConfiguration"] = "my-security-configuration"
|
args["SecurityConfiguration"] = "my-security-configuration"
|
||||||
args["AutoScalingRole"] = "EMR_AutoScaling_DefaultRole"
|
args["AutoScalingRole"] = "EMR_AutoScaling_DefaultRole"
|
||||||
|
args["AutoTerminationPolicy"] = {"IdleTimeout": 123}
|
||||||
|
|
||||||
cluster_id = client.run_job_flow(**args)["JobFlowId"]
|
cluster_id = client.run_job_flow(**args)["JobFlowId"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user