changeset 3711:358a678e5bdf

core (memory/param): don't crash when getting unset int value
author Goffi <goffi@goffi.org>
date Tue, 30 Nov 2021 17:28:03 +0100
parents e3dddf65fa88
children 799d4f6fa7ca
files sat/memory/params.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/params.py	Tue Nov 30 17:27:26 2021 +0100
+++ b/sat/memory/params.py	Tue Nov 30 17:28:03 2021 +0100
@@ -415,7 +415,7 @@
             if node.getAttribute("type") == "bool":
                 return C.bool(value_to_use)
             if node.getAttribute("type") == "int":
-                return int(value_to_use)
+                return int(value_to_use) if value_to_use else value_to_use
             elif node.getAttribute("type") == "list":
                 if (
                     not value_to_use