Skip to content

Commit 1987f10

Browse files
committed
Move code back inside comprehension
I had missed that `d` is only defined inside it.
1 parent 861bb37 commit 1987f10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

citc/aws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ def get_types_info(client):
8282
for page in client.get_paginator("describe_instance_types").paginate()
8383
for i in page["InstanceTypes"]
8484
}
85-
aws_mem = d["MemoryInfo"]["SizeInMiB"]
8685
return {
8786
s: {
88-
"memory": aws_mem - int(math.pow(aws_mem, 0.7) * 0.9 + 500),
87+
"memory": d["MemoryInfo"]["SizeInMiB"]
88+
- int(math.pow(d["MemoryInfo"]["SizeInMiB"], 0.7) * 0.9 + 500),
8989
"cores_per_socket": d["VCpuInfo"]["DefaultCores"],
9090
"threads_per_core": d["VCpuInfo"]["DefaultThreadsPerCore"],
9191
"arch": d["ProcessorInfo"]["SupportedArchitectures"][0],

0 commit comments

Comments
 (0)