From 7b8d9f8dbe0a1064ceb91bc9a84d2587154a5e71 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 30 Apr 2019 18:51:01 +0300 Subject: [PATCH] Round fitting resource attributes properly --- eos/modifiedAttributeDict.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eos/modifiedAttributeDict.py b/eos/modifiedAttributeDict.py index 383e0b41b..1202a4295 100644 --- a/eos/modifiedAttributeDict.py +++ b/eos/modifiedAttributeDict.py @@ -238,7 +238,7 @@ class ModifiedAttributeDict(collections.MutableMapping): if force is not None: if cappingValue is not None: force = min(force, cappingValue) - if key in (50, 30, 48, 11): + if key in ("cpu", "power", "cpuOutput", "powerOutput"): force = round(force, 2) return force # Grab our values if they're there, otherwise we'll take default values @@ -293,7 +293,7 @@ class ModifiedAttributeDict(collections.MutableMapping): # Cap value if we have cap defined if cappingValue is not None: val = min(val, cappingValue) - if key in (50, 30, 48, 11): + if key in ("cpu", "power", "cpuOutput", "powerOutput"): val = round(val, 2) return val