From ea22d219bb54ae387aa88dcdeb1a52f46b3e5d10 Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Thu, 8 Jan 2009 05:31:30 -0700 Subject: [PATCH] Add ConfigFile.get_opt_as_bool() HappyDoc comments --- wifi-radar | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wifi-radar b/wifi-radar index ac29dae..7272e17 100755 --- a/wifi-radar +++ b/wifi-radar @@ -1819,8 +1819,17 @@ class ConfigFile(ConfigParser.SafeConfigParser): except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): return None + # Get a config option and return as a boolean type. + # + #Parameters: + # + # 'option_path' -- string - Section (a.k.a. profile) name concatenated with a + # period and the option key. (E.g. "DEFAULT.interface") + # + #Returns: + # + # boolean - option value as boolean def get_opt_as_bool( self, option_path ): - """ get a config option and return as a boolean type """ option = self.get_opt(option_path) if isinstance(option, BooleanType) or isinstance(option, NoneType): return option -- 2.11.4.GIT