From 5109a6a8d833162f688c44541602b5239ec71a05 Mon Sep 17 00:00:00 2001
From: Attila Farkas <394097@mail.muni.cz>
Date: Fri, 15 Jan 2021 14:01:35 +0100
Subject: [PATCH] Handle empty flavor attribute

---
 modules/preprocessing.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/preprocessing.py b/modules/preprocessing.py
index b331775..d49c7bf 100644
--- a/modules/preprocessing.py
+++ b/modules/preprocessing.py
@@ -53,7 +53,7 @@ def _add_extra_arguments(definitions, flags):
 def _add_flavors(definitions):
     """Change flavor attribute to cpus and memory."""
     for host in definitions["hosts"]:
-        if "flavor" in host:
+        if "flavor" in host and host["flavor"]:
             if host["flavor"] not in FLAVORS:
                 print("Error: Not supported flavor: " + host["flavor"])
                 raise AttributeError
-- 
GitLab