From c0ae10bef62c61126b8427db351751bec44f6f88 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Thu, 18 Nov 2021 19:27:30 -0500 Subject: [PATCH] confighelper: add has_option method Signed-off-by: Eric Callahan --- moonraker/confighelper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moonraker/confighelper.py b/moonraker/confighelper.py index c8d7975..2cd60f3 100644 --- a/moonraker/confighelper.py +++ b/moonraker/confighelper.py @@ -60,6 +60,9 @@ class ConfigHelper: def __contains__(self, key: str) -> bool: return key in self.config + def has_option(self, option: str) -> bool: + return self.config.has_option(self.section, option) + def get_name(self) -> str: return self.section