From e8b89638d4670da713f52baa83d027a6ac1b0b1b Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Jun 22 2022 09:21:10 +0000 Subject: Make the Integer config class actually return an integer Signed-off-by: Aurélien Bompard --- diff --git a/ipsilon/util/config.py b/ipsilon/util/config.py index bbc171a..1707daf 100644 --- a/ipsilon/util/config.py +++ b/ipsilon/util/config.py @@ -195,6 +195,15 @@ class Integer(String): if value: self._assigned_value = int(value) + def get_value(self, default=True): + value = super().get_value(default) + return int(value) if value is not None else None + + def export_value(self): + if self._assigned_value is None: + return None + return int(self._assigned_value) + class Image(Option): """